Posts

d - multiplying a string by an integer returns integers? -

So I was trying to create asterisk pyramid using D. At first I saw that the combination seems impossible. Writing something like writeln ("foo" + "bar") will give you a syntax error. Instead, I tried to multiply the string like a dragon, which did not work with double quoted strings, But there is something strange with single quoted stars. If you type in import std.stdio; Zero main () {foreach (i; 0 .. 10) {article (i * '0'); }} This will return a bunch of integers. Can anyone explain why this happens? And to tell me how to add a string, it really will be helpful. Thank you! '0' is not a string, it is a character that uses ASCII encoding. The number is being multiplied with the integer ID of the encoding. For example, encoding for ASCII's 'A' is 65. import std.stdio; Int main () {writeln (cast ('a'); Written (10 * 'A'); Return 0; } This program will print 65 and 650 because the character is being...

Emacs mode line shows AC is on but no autocomplete is happening -

मैंने ताजा इंस्टॉल किया है स्वतः पूर्ण पॉपअप और एएल-एनआरपीएल एल्पा से जब मैं emacs में एक क्लोज़र बफर दर्ज करता हूँ, तो एसी इंगित करता है कि स्वतः पूर्ण चालू है। लेकिन बफर में मैं जो भी लिखता हूं या करता हूं, मैं कुछ भी करने के लिए स्वत: पूर्ण नहीं मिल सकता। I'v थोड़ी देर के लिए इस समस्या का निवारण कर रहा था, किसी भी संकेत? मेरे पास यह भी मेरे emacs स्टार्टअप में है: (ऐड-टू-लिस्ट 'लोड-पथ' ~ / .emacs.d ") ('स्वत: पूर्ण-कॉन्फिग' की आवश्यकता है) (एसी (एप-हुक 'सीडर-रिप-मोड-हुक' एसी-एनआरईपी-सेटअप) (एड-हुक 'साइडर- मोड-हुक 'एसी-एनरिप-सेटअप) (eval-after-load "auto-complete"' (ऐड-टू-लिस्ट 'एसी-मोड' साइडर-रिप-मोड)) (सेट अप-ऑटो-पूर्ण- पूरा-से-बिंदु-फ़ंक्शन () (setq पूर्णता-पर-बिंदु-फ़ंक्शंस '(स्वत: पूर्ण))) (ऐड-हुक' ऑटो-पूर्ण-मोड-हुक 'सेट-ऑटो-पूर्ण-पूर्ण-पूर्ण-पर -पैंट-फ़ंक्शन) (ऐड-हुक 'साइडर-रिप-मोड-हुक' सेट-ऑटो-पूर्ण-के-पूरा-पूरा-बिंदु-फ़ंक्शन) (ऐड-हुक 'साइडर-मोड-हुक' सेट-ऑटो-पूर्ण को...

c# - Type safety of indexed columns in an in-memory database -

Root of the problem: I want to design a database entry member indexing API, for which the model definition does not require repetition and maintenance. A fair level of security of type. Dry Out-Explanation: I have a basic memory database of people in the table, the full name of each person and the key to their favorite celebrity. Public class IMDB {public dictionary & lt; Int, person & gt; People; } Public class person {public string first name; Public string last name; Public int favorites celebrity id; } Now the celebrities want to be able to find their fans quickly through favorite celebrity ID . An index is clear, and thinking for the future, I created this interface: public class IMDB {public dictionary & lt; Int, person & gt; People; Private dictionary & lt; Object, dictionary & lt; int, int & gt; & Gt; _rowContents; Private dictionary & lt; Object, dictionary & lt; Int, list & lt; Int & gt; & Gt; & Gt; _rowI...

vb.net - vb net backgroundworker + progress bar -

I want to automatically create the progress bar which will pop up when I ran my program .. My program has 6 functions / sub which takes a considerable amount of time to complete the running query, it is input It is about 1-2 minutes for the backgroundworker to handle the thread and to combine it with the progress bar RunWorkerAsync Personal Sub ButtonX1_Click (ByVal Handle ButtonX1.Click) as the System.Object, as byVal e System.EventArgs. Click BackgroundWorker1.WorkerReportsProgress = True BackgroundWorker1.RunWorkerAsync () End Sub Do_work Private sub BackgroundWorker1_DoWork (ByVal as the object, byVal e System.ComponentModel.DoWorkEventArgs ) 100000000 i as integer = 0 to create_tree handles for BackgroundWorker1.DoWork () localtree () Localfrek () create_combination () showresult () if I mo d 10000000 again background 1. Report progress (i / 100) end if the next ending sub progress progress 1_ProgressChanged by Private sub background (ByVa...

php - Writting query in Yii -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मेरे पास निम्न प्रश्न हैं। ..और मौजूदा क्वेरी में कुछ संयुक्त अतिरिक्त संयुक्त बयानों को जोड़ना चाहते हैं ... प्लेन एसक्यूएल क्वेरी पोस्ट करना ताकि यह मुझे पता चले कि मैं वास्तव में क्या देख रहा हूं। / * साधारण एसक्यूएल क्वेरी * / SELECT * से Job_profile उपयोगकर्ता पर उपयोगकर्ता को जुड़ें user.id = job_profile.user_id INNER पर श्रेणी दर्ज करें श्रेणी.id = job_profile.category_id जहां श्रेणी_id = 1 और अनुभव = 2 और key_skills '% php%' की तरह LIMIT 0, 30 / * सरल एसक्यूएल क्वेरी * / मैंने अभी तक चलने की कोशिश की है। और अब तक इसका कामकाज ठीक है ... लेकिन मुझे नहीं पता कि संयुक्त वक्तव्य कैसे जोड़ना है। $ results = SearchEmployee :: मॉडल () - & gt; findAll ("category_id =: श्रेणी और key_skills जैसे: कौशल और अनुभव =: अनुभव", सरणी ('ca तकनीक '= & gt; $ श्रेणी,' कौशल '= & gt;'% '। कौशल'% ',' अनुभव '= & gt; $ अनुभव)); मैं सिर्फ उपर्युक्त बयान रखना चाहता हू...

PHP - Maximum size allowed for each element of array -

In my program, I have 12 multi-dimensional arrays, which vary in size between 200-7000, in each cell of the array There is a float number with precision (such as 0.0000000000000123344) and these arrays pass values ​​to each other for some calculations. At some time I get an error of memory loss in some arrays (I have changed all the configuration related to memory and This maximum stop It is). I am thinking that what is the maximum size to store float in a large array? Thank you. Finally I can find a solution I found that when the PHP collection is being loaded, There is no way to free it. Unset and gc_collect_cycles () are also not effective The only way to use the ** function ** on a separate section of code is in my case , I had a large script for loop , so I copied all of my code into the function, and I call the function in my loop. Every time the function quiets, the memory becomes free. You can test it once in your work by adding memory_get_usage () and see th...

javascript - multiple explode and foreach, while searching a `input` value in txt file html/php/ajax -

Actaully मुझे txt फ़ाइल से इनपुट मान खोजना होगा , जब कुंजी डाउन इवेंट शुरू हो जाता है (इसका अर्थ है कि खोज फ़ंक्शन को alphabetically के रूप में होता है)। उस txt फ़ाइल में एकाधिक पंक्तियाँ और कुंजी है। अब सबसे पहले मुझे उचित परिदृश्य के साथ पूरे परिदृश्य का वर्णन करें। HTML कोड: & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "खोज" /> & Lt; div & gt; & lt; / div & gt; $ (Document) .ready (function () {$ ('input')। Bind ('keydown', function () {setTimeout (खोज ($ (this) .val ()। ToLowerCase ()), 2000);} );}); फ़ंक्शन खोज (v) {$ .ajax ({url: 'search.php', प्रकार: 'प्राप्त करें', डेटा: 'sv =' + v, डेटाप्रकार: 'जेसन', कैश: गलत, सफलता: फ़ंक्शन (आर) {$ ('Div')। रिक्त (); के लिए (var i में r) {$ ('div')। अनुलग्नक (r [i] + ",");}}, त्रुटि: कार्य (a, b, C) {$ ('body')। अनुलग्नक (b + '& lt; hr / & gt;');}}); } पीएचपी कोड: // एडीडी डेटा को T...