Friday, 15 January 2010

Determining size of printed page in Excel VBA -


Is VBA a way to determine the width of units of a printed page in Excel?

The example pseudo-code is as follows:

  Duplicate = Vet =  

My initial idea is to write a function that takes in orientation and paper sizes And returns page width back. For example:

  if ActiveSheet.Orientation = xlLandscape and ActiveSheet.PaperSize = xlPaperLetter then dblPaperWidth = 15840 '11 inches twips other ... end if  
< / Div>

Content Management System targeting Mobile Devices -


If I want to implement CMS for mobile devices, then what kind of points should be kept in mind? For example, to reduce page size, use customized (smaller) pictures any other ideas?

Also, what types of rules can be implemented when changing web pages designed for desktop browsers, as well as web browsers that are easily displayed in mobile browsers?

I know that the mobile device is widely varying in capacity and property, but still trying to list some rules.

Apart from this, any other suggestions, suggestions, questions and advice are welcome on this subject.

Thank you for your opinions and answers.

Short introduction, I have all the things listed below


Phone Identifying

While working as a web context with mobile, it is absolutely mandatory that you correctly identify the phone. This should be a top priority; Here are some problems with recognizing the phone and their features:

  • userAgent.contains ("iPhone") Do not use. is already loaded in web bots and other applications wherein iphone is included in its user agent string and thus you recognize them incorrectly.
  • Do not send user-agent to all phones headers Although some of them send URLs: s, in which the format features all the phones. Unfortunately this presents the next two problems:
  • Obviously you will not have access to any device data there and you are bound to use the public data treasure such as . These databases, however, are incomplete, have to stay a little back or do not have the data you want, although these are your best bet for the initial data set.
  • UAProfs lie. Yes, there is false information in it - lots of it! This is partly because the creators forget to update XML and partially because UAProf files are written during the development of the phone and as we know, the features change during development.
  • On a feature when dependent, make sure that you are not relying on the specific version of a particular phone. For example BlackBerry has a feature named Tile which is actually a great bookmark but you only have it all BlackBerry phone, to identify the operating system version of the actual phone to meet the correct variation of the tile For the touchscreen, the same iPhone was not the first with the touch screen and most certainly not the only one - it is not even expected of such a situation where Only one type of processing is input, for example, touch screen, physical keyboard and stylus too.

Creating Original Page

Thankfully that some such people have agreed and when you make pages, you should use it. But oh how things will be so easy ...

  • All phones have different levels of XHTML-MP / CSS support. For example, if I remember correctly, do not support background color for some older blackberry block elements or whenever header tags are many, we also have span has seen the wrong sequence of elements oh and for some reasons tables are really hard. In fact, you have to go lower on markup / styling invoices.
  • You can not test the existence of the feature using the feature. If you want to detect JavaScript support, you might think that by adding some JavaScript to the page will work for that purpose, right? No, it crashes a significant percentage of mobile phones coming to your site. Of course, new phones are not crashed but everyone has bought their phones in the last 12 months apart from the mobile specific javascript API: according to each manufacturer is different, because at present the low to detect JavaScript-based geographic location There are three separate APIs: None of them are interoperative with others.

Add all of these to the top of the usual CMS features (security, content management and changes, caching, modularity, visitor tracking and whatnot) The picture should be how everything affects everything and how you really should consider the cost of making yourself.

In fact though it is against the general sense of SO SO, I strongly suggest that you get the solutions that are easily prepared like our and instead your site Use it for the need to build. Eventually, our product has a special development of seven years under its hood.


Ready-made forum, chat, and PM solutions for Django -


On my DNS site, I want users to communicate with each other in a number of ways:

  1. Forums
  2. Private messages
  3. Chat with rooms and saved history

Can you recommend the solution ready for it? Especially for chat

Also, is it possible to integrate Google Wave into Django?

Looks like you will have a great fit for it in which you have already been listed bundles.


.net - What is the relative path root of DeploymentItemAttribute? -


का उपयोग करना, इसका सापेक्ष पथ जड़ क्या है।

पेज प्रति ...

रिश्तेदार पथ रिश्तेदार पाथ रूट सेटिंग के सापेक्ष हैं जो .testrunconfig फ़ाइल में मिलते हैं।

< / Blockquote>

यह सेटिंग डिफ़ॉल्ट रूप से, समाधान निर्देशिका है इसलिए, यदि आपके पास यह परियोजना संरचना है

  गुप्तप्रोजेक्ट \ घटक- \ अवयव \ संसाधन \ अपेक्षित। Xml घटक। टेस्टकैप्रोजेक्ट test.cs SecretProject.sln  

और आप required.xml परिनियोजित करना चाहते हैं, तो आप इस तरह एक deploymentItemAttribute बनाने जा रहे हैं

  [TestClass] सार्वजनिक वर्ग की टेस्ट {[TestMethod] [ यह प्रतीत होता है कि फ़ाइल गुणों को ' Content <सेट करें < / Strong> 'और'  हमेशा की प्रतिलिपि बनाएं  'या' नया कॉपी करें ' पर उन्नत उदाहरण हैं। 


git, error, entry blah not updaed, cannot merge -


One file can not be merged, how can I merge it with git?

The error message will be ():

  Fatal: entry 'frotz 'Not uptodate can not be merged  

This means that you have local modifications to' frotz , which will be lost at checkout. You can give ' -m ' option to git checkout , which will try to merge in three ways.

Resolve occasionally

  -m - merges  

When switching branches, if you

so the current branch of local modifications in one or more files and the branch that you are switching Are different, the command denies switching branches

The merge process will be:

  git checkout -MMtepec auto-merge frog  

This merged into three ways Area after local modifications not is registered in your index file, so git diff will show you that you've changed since the tip of the new branch.

-m is done while switching branches with option, you will see something like this:

  $ git checkout -m mytopic auto-merging frotz Error: Merge merge into Frotz Fatal: Merge program failed  

At this point, git diff as the previous example Shows well-merged changes, as well as changes in disputed files.
Edit and Resolve Conflict and Resolve it with Mark Add git

  $ frotz $ git frotz in general  

cruisecontrol.net - Fork process with CC .NET -


Is there a way to create a process in Cruise Control .NET? I want CC.net to launch a program when everything goes well, but now, CC.Net insists on the fact that the program will be closed upon completion of the build.

The program that has been started is up to one week at a time.

The way I do this is to use a PowerShell or batch script. The script can launch your process and after returning the executable, you can return to CC.NET as usual. This is the only way I can see, because CC.NET needs to go back and the script can return, even with the process that is running there. A sample PowerShell script is what you want. So you call PowerShell script along the path of XE as the percetimeter.

  Press the $ exepath = $ ("Executionable Path Executionable"). $ $ Item $ exePath  

Here CC.NET 1.5 But how will the powerhell set work

  & lt; Powershell & gt; & Lt; Script & gt; YourScriptName.ps1 & lt; / Script & gt; & Lt; ScriptsDirectory & gt; D: \ CruiseControl & lt; / ScriptsDirectory & gt; & Lt; BuildArgs & gt; You want to kick off the full path of exe & lt; / BuildArgs & gt; & Lt; / Powershell & gt;  

microcontroller - Circular buffer pointer irregularities -


This is the follow-up on this question:.

After applying one to the microcontroller, it seems that there is a problem with the indicator

sent to RS-232: ADE 1234
Received (buffer = 8): E24AE2 / E2AE24 (Flix between the two) received (buffer = 16): D234E1 (A has been omitted because it is a synchronized byte (RX_BufSize = 32): DE1223 / DEE123 / DE1234 / DE12E1 (flip randomly received): Expected receive: DE1234

< P> Start

  Source: Thim 207 BTS Ektroniks - Académie de Strasbourg #define RX_BufSize 8 // Tayl Doo Bfr_araks four Bfr_araks [RX_BufSize]; // buffer circularie D reception four * ptrRX_WRdata = Buffer_RX; // bureau DRX four times * ptrRX_RDdata = buffer_rx; // burer DRX unsigned Charles Buffer_Cmd [7];  

The debug value displayed on the LCD

  // Printed debug value. The decoded output is seen through the U2 Beef Dispstring (-62, 17, 0, "Ply 2"); Four U2buf [] = {slave_command, slave_pal_d, slave_bal_x, slave_bal_y, slave_point_a, slave_point_b, '\ 0'}; Disp_string (-37, 17, 1, U2buf); Four U3buf [] = {buffer_rx [0], buffer_rx [1], buffer_rx [2], buffer_rx [3], buffer_rx [4], buffer_rx [5], buffer_rx [6], buffer_rx [7], '0} ; Disp_string (-37, 27, 1, U3buf); Four U4buf [] = {buffer CMD [0], buffer_cmd [1], buffer_cmd [2], buffer_cmd [3], buffer_cmd [4], buffer_cmd [5], buffer_cmd [6], '\ 0'}; Disp_string (-37, 7, 1, U4buf);  

get the interrupt

  zero _Isr _NOPSV _U1RXInterrupt (zero) {IFS0bits.U1RXIF = 0; While (U1STAbits.URXDA) {* ptrRX_WRdata ++ = U1RXREG; If (ptrRX_WRdata == buffer_x + Rxblufcease) ptrRX_WRdata = buffer_rx; } If (U1STAbits.OERR) {U1STAbits.OERR = 0; }}  

Work from source

  int ReadRXD (char * c) {if (ptrRX_RDdata == ptrRX_WRdata) Return (0); // Pas de caractère reçu else {* c = * ptrRX_RDdata ++; If (ptrRX_RDdata == Buffer_RX + RX_BufSize) ptrRX_RDdata = Buffer_RX; Return (1); }} Zero Detect_Cmd_RXD (zero) {int i; Four c; If (ReadRXD (& amp; c)); ACL_XY_AFFICHER_CARACTERE (5, 3, 256 + 'z', 1); ACL_XY_AFFICHER_CARACTERE (25, 3, 256 + C, 1); For (i = 1; i & lt; 7; i ++) buffer_cmd [i-1] = buffer_cmd [i]; Buffer_Cmd [6] = c; If (buffer_m [0] == 'A') {// & amp; (Buffer_cmd [4] == 0xAA)) {ACL_XY_AFFICHER_CARACTERE (15, 3, 256 + 'Q', 1); Slave_command = buffer_cmd [1]; Slave_pal_d = buffer_mmd [2]; If (system_player == 2) {slave_bal_x = buffer_cmd [3]; Slave_bal_y = buffer_cmd [4]; Slave_point_a = buffer_mmd [5]; Slave_point_b = buffer_mdm [6]; }}}  

Detect_Cmd_RXD is called the second at every 1/256th position. During that time, at least 7 values ​​will be sent in the UART received buffer.

Could it be possible that the process of writing is so fast that it gets caught on reading indicator? What can I do to solve this problem, besides calling Detect_Cmd_RXD most often? First step: If there is a buffer overrush in blockage obstruction, then check for overflow in Detect_Cmd_RXD routine. See that changing the buffer size affects the number of overruns.

The second step: If you reach the buffer size where there is no overrun, and there is still corruption, take a good look at the interrupt routine. UARS can be very sensitive to how you can reach your registrars, or order the operations, check the hardware datasheet and verify that you are reading it correctly - still better, find some sample code that you can do Wish, does the same type. Replacing characters when buffer size is 32, you may be recording data twice before getting the chance to settle down with the status bit.


HTML DOM width + height of visible window -


How can I get the current height and width of the available space in the browser as it is open?

I do not want the height of the total document, just look at the screen.

You can take a look at this method to see it.

and alert that function to

  in less () {var myWidth = 0, myHeight = 0; If (type window.innerWidth == 'number') {// non-IE myWidth = window.innerWidth; MyHeight = window.innerHeight; } And if (document.documentElement & amp; amp; document.documentElement.clientWidth || document.documentElement.clientHeight)) {// IE 6+ in 'standard compatible mode' myWidth = document.documentElement.clientWidth; MyHeight = document.documentElement.clientHeight; } And if (document.body & amp; (document.body.clientWidth || document.body.clientHeight)) {// IE4 compatible myWidth = document.body.clientWidth; MyHeight = document.body.clientHeight; } Window.alert ('width =' + myWidth); Window.alert ('height =' + myHeight); }  

It should also be noted that most of the JS framework (jquery, ext, prototype) will provide a function to do so.

In jQuery:

  $ (window). With (); $ (Window) .height ();  

c# - How many requests can SQL Server handle per second? -


I am using JMTor to test the performance of our application. But I think that when I send 20 requests from JMT, the reason for this should add 20 new records to the SQL Server, but I only get 5 new records, which means that SQL Server abandons other requests ( Because I have a log, and make sure the new record is sent to the SQL server.)

Does anyone have any ideas? What is the threshold number of requests that SQL Server handles per second? Or do I have to do some configuration?

Yes, in my application, I tried, but it seems that only 5 requests are accepted, I do not know how to configure, it can accept more.

I think the NRR requests per second are issued directly to the SQL server in your inserts Throw it. Probably an application logic error that fails to roll back or inserts. Or the application fails to handle the concurrency and incorporates data that violates the barriers. I also check server logs for deadlock.


linux - Why doesn't ld honor the '-rpath-link' option? -


I have to find out that the use of the string is:

  8480 execve (" / Usr / lib / gcc -lib / i486-slackware-linux / 3.3.4 /../../../... i486-slackware-linux / bin / ld ", [" / usr / lib / gcc -lib / i486-slackware -LINux / 3.3.4 /../../../../4464-slackware-linux / bin / ld ", ..." -L / home / bjack / lib ", ... "-path -Leg", "-ligore", "-DLL", "-lig", "-liggers", "-liggers", "-liggers", "/ -jac / src / firmware / bj -bg / ab-bj-gameprom-module / src / display / logic "--rpath", "/ home / bjack / lib", "-lgcc", "-s-required", "-lgcc_s", " Not-required "," -lc "," -lgcc "," -s-required "," -l-gcc_s "," -no-necessarily "," /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/crtend.o "," / usr / lib / gcc- Lib / i486-slackware-linux / 3.3.4 /../../../ crtn.o "], [/ * 26 wars * /] = 0  

< Open ("/ home / bjack / lib / libygor.so", O_RDONLY) = -1Enont (such a File or directory) 8480 open ("/ home / pm / lib / LIBOROG.", O_ RDONLY) = -1 ENOENT (no such file or directory)

I am confused ; According to Manual LD, you should try to find the first -rpath-link path.

-rpath-link to affect shared logs only Depends on other shared libraries (only in the LD (1) man page) is documented. Since you are adding an executable link, either it has been ignored or its treatment is just like one or the other means that the -rpath-link path is used only for recursive dependencies, but You set it while executing an executable link.

Anyway, I think it is not being used because you do not have anybody's library depending on the other.


php - The values of a form can not be passed on to the action file or the action file can not get the values of the fields in the form -


यह PHP कोड है:

  $ html = & lt; & lt; & lt; eod & Lt; div & gt; आपका चालू खाता शेष & lt; span शैली = "रंग: लाल" & gt; $$ संतुलन & lt; / span & gt; & lt; / div & gt; & lt; br / & gt; & Lt; form id = "digitalchange" action = "digitalchange.php?" कार्रवाई = "पोस्ट" & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "tid" मान = $ घोषणापत्र / & gt; & Lt; तालिका नियम = सभी फ़्रेम = बॉक्स> gt; & lt; tr & gt; बैलेंस: & lt; अवधि वर्ग = "मूल्य" & gt; $ शेष & lt; / span & gt; & lt; / td & gt; & lt; td & gt; वर्तमान कमी: $ कमी और लेफ्टिनेंट; ; / टीडी & gt; & Lt; td & gt; इकाई मूल्य: & lt; span class = "price" & gt; $$ यूनिटप्रिस & lt; / span & gt; & lt; / td & gt; & lt; / tr & gt; & Lt; tr & gt; & lt; td & gt; बैलेंस जोड़ें: $ & lt; इनपुट प्रकार = "टेक्स्ट" id = "असंतुलन" नाम = "असंतुलन" आकार = "5" /> gt; & lt; / td & gt; & Lt; td & gt; शॉर्टॉल जोड़ें: & lt; इनपुट प्रकार = "टेक्स्ट" id = "addquota" name = "addquota" आकार = "4" /> gt; & lt; / td & gt; & lt; टीडी & gt; & lt; / td & gt; & lt; / & gt टीआर; & Lt; tr & gt; & lt; td & gt; & lt; / td & gt; & lt; td & gt; कमी करें: इनपुट  gt; & lt; / td & gt ; & lt; टीडी & gt; & lt; / टीडी & gt; & lt; / टीआर & gt; & lt; / तालिका & gt; कृपया केवल एक बार पुष्टि करें क्लिक करें & Lt; इनपुट प्रकार = "सबमिट करें" मान = "पुष्टि करें" / & gt; & lt; / form & gt; & LT; घंटा & gt; दिन के अंत; $ एचपी गूंज;  

नीचे डिजिटलचेंज में पहली दो पंक्तियां हैं। Php:

  $ addbalance = $ _ POST ['असंतुलन']; "गलत क्या है" गूंज। $ Addblance;   

$ _REQUEST की कोशिश की, लेकिन अभी भी विफल असंतुलन का इनपुट बॉक्स रिक्त नहीं है। लेकिन ऐसा लगता है कि डिजिटलचेंज के रूपों के मूल्यों को डिजिटलचेंज.एफ़पीपी पर नहीं भेजा जा सकता है। क्या हुआ है?

मैं आपके द्वारा पोस्ट किए गए कोड के साथ दो चीजें गलत देखता हूं:

  & lt; form id = "digitalchange" action = "digitalchange.php?" कार्रवाई = "पोस्ट" & gt; ^  

यह विधि = "पोस्ट" होना चाहिए। इस तरह की समस्याओं को खोजने के लिए अपने HTML का प्रयास करें।

<पूर्व> $ addbalance = $ _ POST ['असंतुलन']; "गलत क्या है" गूंज। $ Addblance; ^

यहां एक साधारण टाइपो आपको हमेशा अपनी त्रुटि लॉग की जांच करनी चाहिए, यह आपको एक अघोषित वेरिएबल $ addblance का उपयोग करने के बारे में एक चेतावनी दी होगी।


Is there a syntactic sugar C# property syntax to instantiate generic collections? -


निम्न प्रोग्राम असफल हो जायेगा क्योंकि संविदाएं चालू नहीं होती हैं।

of निश्चित रूप से मैं इसे अपने कन्स्ट्रक्टर में इन्स्तांत कर सकता हूं, लेकिन अगर मेरे पास दर्जनों प्रॉपर्टी और / या कई कंस्ट्रक्टर हैं, तो मुझे ट्रैक करना पड़ेगा, जो तत्काल हो, आदि।

और निश्चित रूप से मैं पूर्ण हो जाता है और सेट और निजी फ़ील्ड वैरिएबल आदि के साथ इन गुणों के लिए बड़े ब्लॉकों बना सकते हैं। लेकिन यह भी गंदा हो जाता है।

क्या इस संग्रह को स्वचालित रूप से अच्छा सी # गुण वाक्य रचना के साथ इन्स्तांत करने का कोई तरीका नहीं है?

  सिस्टम का उपयोग कर; System.Collections.Generic का उपयोग कर; नेमस्पेस TestProperty232 {क्लास प्रोग्राम {स्थैतिक शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {ग्राहक ग्राहक = नया ग्राहक (); ग्राहक। प्रथम नाम = "जिम"; ग्राहक। लिस्टनाम = "स्मिथ"; अनुबंध अनुबंध = नया अनुबंध (); अनुबंध। टाइटल = "प्रथम अनुबंध"; customer.Contracts.Add (अनुबंध); Console.ReadLine (); }} सार्वजनिक वर्ग ग्राहक {सार्वजनिक स्ट्रिंग प्रथमनाम {प्राप्त; सेट; } सार्वजनिक स्ट्रिंग LastName {get; सेट; } सार्वजनिक सूची & lt; अनुबंध & gt; संविदाएं {प्राप्त करें; सेट; } सार्वजनिक ग्राहक () {// कॉन्ट्रैक्ट्स = नई सूची & lt; अनुबंध & gt; (); }} सार्वजनिक वर्ग संविदा {सार्वजनिक स्ट्रिंग शीर्षक {प्राप्त; सेट; }}}}  

कोई ऐसी वाक्यविन्यास चीनी नहीं है, लेकिन मैं इंगित करना चाहता हूं कुछ चीजें बाहर:

  • किसी भी मामले में।
  • यदि आपके पास एक ही प्रकार में बहुत सारे गुण हैं, तो यह एक मजबूत लक्षण है कि आप एकल उत्तरदायित्व का उल्लंघन कर रहे हैं सिद्धांत
  • यदि आपके पास कई कंस्ट्रक्टर हैं, तो आपको हमेशा बहुत सावधानी बरती रहनी चाहिए कि केवल एक कन्स्ट्रक्टर है जो असली काम करता है, और अन्य सभी कंस्ट्रक्टर उस कन्स्ट्रक्टर को नियुक्त करते हैं। वैकल्पिक रूप से आप सभी कन्स्ट्रक्टर के काम को एक निजी इनिशलाइज़ विधि में प्रतिनिधि कर सकते हैं।

How to assign columns as dates in rails -


Hi guys in the train on Ruby, I have a table with 7 columns like Monday, Tuesday, Wednesday etc. Catch ..

I want these columns to be handed on the actual day of the week so that if Tuesday's column data (times) is presented on Tuesday, then how can I thank this in advance?

  record. Send (time.None Northwestraft ("% A"). DownCas )  

This represents whatever is the record , on weekdays (from "Sunday" to "Saturday").


c++ - How to prevent window resizing temporarily? -


I have a window that can be resized, but in some cases it is not possible to resize due to application state. is. Is there a way to stop the window resizing temporarily?

I want to disable resizing of all methods available to users, including the window menu, by dragging the edges through a mouse, the user started the window tiling introduced by the OS - and perhaps I do not know anyone else?

One way to get GWL_STYLE flag window style and
Reset / remove any of your needs, that is, WS_THICKFRAME style so that the window can not be resized. New style with

you


parsing - Best JSON parser for Qt? -


I am using QT for Symbian and need a simple Jason Parser. I should be able to go around the QT-Variant and the other way around Jason. Is there a simple Jason Parser I can use? I do not want to write myself.

You do not need any additional code except the QT itself to parse JSON Qt


How to read data from rom_type in VHDL? -


मैं rom_type से डेटा कैसे पढ़ सकता हूं?

  इकाई my_rom port है (addr: in Std_logic_vector (3 से डाउन 0); डेटा: बाहर std_logic_vector (0 से 7)); अंत my_rom; वास्तुशिल्प my_rom का एक प्रकार है rom_type सरणी (0 से 7) की std_logic_vector (0 से 7); निरंतर R1_ROM: rom_type: = (- डेटा); डेटा शुरू करें & lt; = R1_rom (conv_integer (addr)); अंत ए;  

आप conv_integer का उपयोग कर रहे हैं, जो इसका हिस्सा नहीं है कच्चा वीएचडीएल ... यह एक पुस्तकालय में है हालांकि, आप इसका उपयोग नहीं करना चाहते हैं -।

इसके बजाय उपयोग ieee.numeric_std.all; वह है जो आपको अपनी इकाई से पहले की आवश्यकता है। फिर to_integer (अहस्ताक्षरित (addr)) का उपयोग करें को रोम की अनुक्रमणिका बेहतर अभी भी, पते को अहस्ताक्षरित वेक्टर या सीधे एक पूर्णांक के रूप में पास करें।

संख्याओं का प्रतिनिधित्व करने के लिए std_logic_vector (जो सिर्फ बिट्स का एक बैग है) का उपयोग करने की आदत से बाहर निकलने की कोशिश करें, और अच्छी तरह से परिभाषित संख्यात्मक प्रकारों का उपयोग करें।

या Verilog का उपयोग करें, जो परवाह नहीं करता है :)

मुझे, मैं VHDL की मजबूत-टाइपिंग को मुझे निर्बाध पैर की शूटिंग से रखने के लिए पसंद करता हूं ...


frameworks - How to manage security with google guice? -


Is Google a way to handle security with GUICE (like Spring Security)?

I recently used the method interceptor (AOP) and guides to access a role based on a project Have completed A decent example of this kind of implementation is available.


c# - Parsing a fraction to double -


I want to parse the stored part in a string (eg "2/13") I repeat the parsing code But my only question is where should this code be best if I can double use it. For this purpose () function () Is it possible to do this? If double Purse () can not be used because it's about writing an extension method? Or any other way?

I do not want to write an excerpt class because the conversion to repeat the fraction of the string once the operation is over (when the user first enters) and then the fraction strings will be abandoned.

"... after that the fraction string will be removed."

You can create fraction squares, with a static parse method that takes a string and returns a double return. Public Static Class Fraction {Public Static Double Pars (String in Well) {// Code String // To Pars and Calculate Return}}

Usage:

  double myvalue = fraction Purse ("2/13");  

Nothing is immediate, nothing is left ...

This approach definitely accepts that you do not care to keep original values On the basis of your mention (in the Yr question that you want to use "throwing" anatial string value to make the numerator)

If, otoh, you want to "hold" that condition Were (in the beginning of the two integers used to make the fraction N), then there would be a better way of going to a different non-stable class (actually a structure might be better) in this case then you lose no precise, because the future arithmetic functions are used by the examples of this structure Two basic precise integral state values ​​stored in these areas can be coded to be used.


.net - How to remove the current DataItem from being bound to a ASP.NET Repeater? -


I want to force the current dataet to be repeater and it is being added to my position. I would have thought that setting e ITEM Nothing will work on the datatom, but it is not. To complete any condition, any ideas to add any dynamites to complete any situation?

  Protected sub-rpt_OnItemDataBound (ByVal sender as an object, e-mail as an AWARG email as a repeater) If E. Itam type = ListItemType item or e Item.item type = listitime type.electing etam, if right then 'current item e Do not add item. Datitum = nothing else 'add the existing object end if end if end  

Have you tried to wrong the visibility of the item?

  If true then // current item e Do not add ITAM. Visual = False Asee // Add the current item if  

PHP, curl, and raw headers -


When using the PHP cURL function, to see if the raw header is curl On the server

You can use:

Before the call

  curl_setopt ($ ch, CURLINFO_HEADER_OUT, true);  

after

  $ headers = curl_getinfo ($ ch, CURLINFO_HEADER_OUT);  

c# - Using return to exit a loop? -


If I write, do or loop, is it possible to come out of this return keyword?

Example:

  class breakteest {public static zero main (for (int i = 1; i & lt; = 100; i ++) {if (I == 5) ** return; ** console.light line (i);}}}  

I know that returns can be used to exit the statement So, I am curious about this because I have never used it (and can not use my software to write code for testing).

return will exit the current method (main in your example). Use break to exit the loop.


Calling web service (SOAP) with PHP involving enums -


I want to call a web service using SOAP (using SOAP extensions). There is a web service in question

Now the currency type is an NM, and I can not figure out how to work with them in PHP to be able to call the 'conversion rate' function. I know that I have to do something with the class map, but I can get only limited and useless information on this subject. Can anyone help? Can a work example be?

Thanks

The enum here defines only valid values, that your data Type is actually a string from those values.

There are some generation-codes to get you on your way:

$ from_currency = "AFA";

$ to_current = "ALL";

$ soap_handler-> conversion rate ($ from_currency, $ to_currency);

$ exchange_rate = $ soap_handler-> response ();


asp.net - Relationship Between ASPNET Membership Provider Tables and Custom Membership Tables -


I went through a custom profile provider example some time ago and now I am reviewing it.

All dbo.aspnet_ * tables are created in my database when I started the aspnet registration wizard. In these tables, I have an ASPNet profile in which there is an FK obligation, pointing to ASPnet_USers.

I also have two tables MyDB: First of all, DBAPROFILEDATA, is a foreign key constraint that points towards dbo.Profile.

What do I understand is that tables in MyDB are related to those in dbo.aspnet_ * MyDB and aspnet tables should not have a foreign key constraint (or any kind of relationship) between profile tables. ? Some discussion about my custom tables with the people provided by the escenu would be amazing

thanks in advance

I can see there are two options, both of which will basically give the same result:

  • dbo.aspnet_User.UserID < > From dbo.Profile.UserID , then define a unique key on dbo.Profile .UserID (as long as you make it to dbo.Profile Do not use PK columns as If)

  • The dbo.aspnet_Profile FK. ProfileID to dbo.Profile.ProfileID

dbo.aspnet_user logically 1 - 1 of With dbo.aspnet_Profile , it does not really matter which approach you use, as you'll still get the same relational integrity

if you With the implementation of the self, instead of replacing the standard profile data table, it makes more sense to use the first suggestion, otherwise if you have So Hail are extended schema using other suggestions.

edit

aspnet_Profile is the standard table - standard SqlProfileProvider stored user's profile data As a serialized property bag in aspnet_Profile , why not even have a separate aspnet_ProfileData table

from this perspective to the profile schema Can be easily adapted for different applications without any changes to the underlying database required So there is, and that .NET is the most suitable solution for a structure. The flaw is that SQL Server does not have easy access to this data, so it is more difficult to index, update and link the user's profile data using T-SQL and set-based logic.

The most common approach I've seen to remove this limitation is to expand the standard SqlProfileProvider to write in a custom profile data table, which includes application-specific profiles There are specific columns for properties. This table naturally has 1-1 relationships with the aspnet_Profile table, so above it is a foreign key as the above signal.

The role of the extended provider is to promote specific profile properties for columns during the profile profile, and read in the columns when the profile is retrieved.

This allows you to blend and match storage solutions on a need-based basis, as long as your extended provider knows how to come back to the standard implementation, where it is given about 'address 'Is not property

I always think it is best to leave standard membership tables, and where it is necessary to use new tables with the appropriate foreign key, then give the sub-category to the appropriate provider and the provider's methods Override with yourself Implementation (wherever possible, calling in the base implementation).


windows - Set directory permissions with inheritance during application installation? -


I found out that the answer says how to set directory permissions using the lock parameter table. I tried to do this, but it does not set legacy set for any subdirectory. I should be able to set permissions for a particular folder that I am creating and inheriting those permissions within and below all those files and directories. Is there a way to do this without adding a line to the lock parameter table for each and every directory (and file) that I want to impress?

You can either see that MsiLockPermissionsEx support in MSI 5 is (and you have acceptable dependencies because Currently it is only available on Windows 7), or you can apply custom support. There are limitations (and others) written by you in LockPermissions support available in earlier versions of Windows Installer.


language agnostic - Regex help: capture an entire line if it starts with a 1. or 2. -


I'm terrible at regexes, but would like some help in defining a rule that will take this text:

  • Il Cucio, via Ronchi 43 / B, 14047 Mombasi, Esti. Tel: 380 7277050 Fax: 0141 958 282 E-mail: info@ilcuccio.it www.ilcuccio.it
    Accommodation in communal rooms or tents. French and spoken English contacts: Christina Bellotti

  • Epicolta Lida Barbara, Strada Crvenzolo 21, Wig UZolo, 15058 Alessandria Telephone: 0131 89 9 6166 & amp; 392 9078020 E-mail: barbaraleida@tiscali.it is a farm located in the field, certified organic (CCPB).

  • Edit < / Strong>: As long as no one goes to me, I will show my work, additional points for a consistent explanation. In the second phase. Now I have ^ \ d + \. , which is a startlines, points, duration.

    in ruby ​​

      mystring = "1. el quasio, ronique 43 / B, 14047 Mombeselli, Asti. \ N TEL: 380 7277050 Fax: 0141 958 282 E-mail: info@ilcuccio.it www.ilcuccio.it \ N Candidates in communal rooms or tents French and English \ N Spoken contact: Christina Bellotti. \ N \ n2. Epicolta Lida Barbara, Strada Crvenzolo 21, wig uzzolo, 15058. Alessandria, NTEL: 0131 899166 and amp; 392 9078020 Email: barbaraleida@tiscali.it \ n Farm, Madeini Ela It has certified organic (CCPB) located in. \ N \ n "# Scans [[addr1 ']), [[Addr2'], ['addr3'], ...] are called mystring.scan ( / ^ \ D + \. (. +) $ /)  

    Output:

      Il Cucio, via Ronchi 43 / B, 14047 Lee, Asti Epicolta Lida Barbara, Strada Crvenzolo 21, Wig UZolo, 15058 Alessandria  

    integer - matrix multiplication for integral types using BLAS -


    What is the equivalent of dgemm (from BLAS) for the integral type? I know only for DGMM, SGMM's double exact / one exact matrix, but it wants to do the matrix which is integral type like int (or small ink) ...

    Note: I 'Not looking for a solution that involves changing float / double, and I am looking for a fast library implementation.

    In addition, the same question for dgemms (using the Strasson Algorithm).

    You have not specified a programming language in C ++, you can interface with a matrix library. As such (Disclaimer: I am affiliated with this project). Egene uses vectoring, so it should be very fast - make sure you - but I have not done any experiment so I am not sure. There are some complex things that may be a problem for you, but I am not aware of them.

    In the context of computer graphics, discusses various C ++ Matrix libraries.


    networking - C# - Network vs. Server -


    I am working on an emulator, and sends some packets separately, but the customer receiving the packet receives Enabled Many packets received from one are coming.

    Here's my method:

      /// & lt; Summary & gt; /// For sending the character for the gameplay sends some packets on the log. /// & lt; / Summary & gt; /// & lt; Param name = "character" & gt; The character that created the frame for & Lt; / Param & gt; Public Zero SendLoginWelcome (Character Character) {character.Session.SendData (New NewMapRegionPacketComposer (Character). Serialize ()); WelcomeScreen.Show (character); SendCloseInventoryInterface (character); SendTab (Character, 6, 745); SendTab (Character, 7, 754); SendTab (Character, 11, 751); // Chat option SendTab (Character, 68, 752); // Chatbox Sendab (Character, 64, 748); // HP Bar Sandsbyb (Character, 65, 749); // Prayer Bar SendTab (Character, 66, 750); // Energy Bar Sandbab (Character, 67, 747); Character. Session Sandadata (new config pocket composer (Character, 1160, -1). Serialize ()); SendTab (Character, 8, 137); Chat playback on chat (Character, 73, 92); // Invasion tab SendTab (Character, 74, 320); // Skill Tab SendTab (Character, 75, 274); // Search tab SendTab (Character, 76, 149); // Inventory tab, SendTab (Character, 77, 387); // Tools tab, SendTab (Character, 78, 271); // prayer tab SendTab (Character, 79, 192); // Magic Tab, SendTab (Character, 81, 550); // Friends Tab SendTab (Character, 82, 551); Leave on the // tab and sendTab (Character, 83, 589); // Clan tab, SendTab (Character, 84, 261); // Setting the Tab Setting Tab (Character, 85, 464); // Send Tab Tab Tab (Character, 86, 187); // Music Tab, SendTab (Character, 87, 182); // logout tab}  

    CloseInventory & amp; SendTab methods:

      /// & lt; Summary & gt; /// inventory closes the interface. /// & lt; / Summary & gt; /// & lt; Param name = "character" & gt; The character that created the frame for & Lt; / Param & gt; Public Zero SendCloseInventoryInterface (Character Character) {character.Session.SendData (New Interface Config Packet Composer (Character, (Short) (Character. HD? 746: 548), 71, True) .Serialize ()); } /// & lt; Summary & gt; /// sends a tab interface /// & lt; / Summary & gt; /// & lt; Param name = "character" & gt; The character that created the frame for & Lt; / Param & gt; /// & lt; Param name = "tabId" & gt; Tab id & Lt; / Param & gt; /// & lt; Param name = "childId" & gt; If the child of the tab. & Lt; / Param & gt; Public Zero SendTab (Character Character, Short Tab ID, Short ChildId) {character.Session.SendData (New Interface Packet Composer (Character, 1, (Short) (childId == 137? 752: (character.Hd? 746: 548) ), TabID, ChildID). Serialize ()); }  

    The serialize () method basically gets in the header and payload tojender SendData () method just by socket (asynchronous) The byte array sends.

    As you can see, basically sending several packets at the same time, but in different arrays. My question is, what would be more efficient for the stability and performance of the server, sending that method within an array (I must include each of them, then send it through the network) or after it was created Send it raw.

    By joining the ARM, there may be some performance problems, because it is a multi-player server, the more players the server is, the more the server loads it has to be sent separately. Dissolve it to make a difference?

    The more packets you send, the more bandwidth is absorbed from your upper part.

    Although there are other issues ... I think that udp versus TCPIP is more important for sections of data.

    In fact, you want to convey the data as bandwidth and the latency is hampered ... the cost of decompressing might be much less.

    Whatever is given for the display question, it is impossible to answer the priority.

    In fact the issue of packet frequency is an optimization problem

    The answer is not too much, but any official answer will actually be I. Beyond

    Actually you are responsible for the experiment.


    c# - how to set focus for last added ctrl in TableLayoutPanel -


    Using TableLayoutPanel to display images. Dynamically here I will add a lot of image to TableLayoutPanel. I need to focus on the last image .... I do not know how to do this please help me ....

    You can activate the final control by control. Selection () properties


    C# LINQ Autogenerated number or index -


    संयोजन प्राप्त करते समय, ऑटो उत्पन्न संख्या उत्पन्न करने का संभावित तरीका क्या है।

      सार्वजनिक (लाल, कार), {लाल, बाइक}, {ग्रीन, कार}, {en} रंग {लाल, हरा, नीला} सार्वजनिक एंम वाहन {कार, बाइक}  

    ग्रीन, बाइक} ......

    (जॉन स्कीट ने मुझे इसे हल करने में मदद की है)।

      var query = color c से Enum.GetValues ​​(प्रकार (रंग)) में Enum.GetValues ​​में वाहन वी से (प्रकार (वाहन)) नए का चयन करें (रंग = सी, वाहन = वी);  

    अब मैं इस तरह के संयोजन चाहते हैं

      {1, लाल, कार}, {2, लाल, बाइक}, {3, ग्रीन, कार} }, {4, ग्रीन, बाइक}, {5, ब्लू, कार}, {6, ब्लू, बाइक}  

    ऑटो संख्याएं बनाने का तरीका क्या है?

    < / Div>

    कोशिश करें:

      int optionNumber = 0; Enum.GetValues ​​(typeof (वाहन)) में वाहन वी से Enum.GetValues ​​(typeof (रंग)) में रंग सी से var क्वेरी = से नया {number = optionNumber ++, रंग = सी, वाहन = वी};  

    How to pass Id of a div that is clicked to a function that handles the click in jQuery -


    I want my Divi ID to be consistent with the items in a database, based on the ID, the appropriate content from my app database Will pull.

    So when I handle one click (), Then I am clicked on the function to pass the ID of the division that handles it. How do i do this

    Your click inside the event handler function, reference ( This keyword) refers to the DOM element that triggers the event, for example: you $ ('div [id]'). Click on (function () {// all divs in which id attribute var id = this.id; // or $ (this) .attr ('id'); some other functions (id);});


    javascript - Problem with jQuery live and IE -


    I have a problem with jQuery and IE I've compressed it down:

     < Code> jQuery ("# ​​missionDashboardRoleFilter") Live ("change", function () {alert ("called");}); & Lt; Select ID = "MissionDirectorrollFilters" & gt; ...  

    It's working fine in Firefox, Chrome, Opera ... but (obviously) not in IE6.

    I'm not sure what to do ... any thoughts?

    On jQuery's live event page (), it is said:

    Not currently supported: Blur, Focus, Mousecenter, Mouseway, Change, Submit


    could not find framework in eclipse RCP application -


    I have developed an Eclipse RCP application that I am calling from my Java program.
    When I run my Java program from Command Prompt (Window) it is working perfectly and giving results.

    But when I integrated in Eclipse with Ant Build Script 3.2 is offering the following problems:

      Log org.eclipse.core.launcher 4 0 December 02, 2009 10: 53: 17.608 Message Exceptions Eclipse Stage: Stack java.lang.RuntimeException: The structure at org.eclipse.core could not be found. launcher.Main.getBootPath org.eclipse.core.launcher.Main.basicRun (Main.java:174) on org.eclipse.core.launcher.Main.run (Main.java:395) (Main.java:704) on xxx.xxx.xxxx.MyCodeGenerator.main (MyCodeGenerator.java:13) on sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) on sun.reflect.DelegatingMethodAcc on essorImpl.invoke java.lang.reflect.Method.invoke (Method.java:585) to (DelegatingMethodAccessorImpl.java:25) org.apache.tools.ant.taskdefs.ExecuteJava.run (ExecuteJava.java:202) organization on .apache.tools.ant.taskdefs.ExecuteJava.execute (ExecuteJava.java:134)  

    would you please have that can help me probable cause of this error.

    As noted in you, you:

    • platform plugins You only want to add to your list of dependent plugins, depending on your convenience,

    (see for example)

    Ensure that you have your own RCP (see) "Plug-in valid" before Onc. With the launch configuration dialog, in the "Plug-ins" tab, you can click on the "valid plug-in" button, which you can click to verify that all the dependencies of the "selected" plug-in are satisfied. .
    If there are some errors, you can click on "Add required plug-in."> "To fix the error.


    Regex Question (detecting spam) -


    I'm getting weird spam, where the email body only has this:

    4606142 5801100 2704743

    How can I grep with regex?

    It is 3x7 number, different with space.

    thx

    try it

      ( \ D {7}?) {3}  

    Or, if this white space creates a difference (as Al said in the comment)

      (\ D {7}) {2} \ d {7}  

    .net - Using StructureMap to Configure Prism -


    I am using Prism and Integration IOC container which comes with Prism. However, I would like to use a different IoC container if it is possible; Is this? Preferrably I want to use StructureMap, note that I am not familiar with StructureMap yet, but on the basis of many recommendations, I want to give it a try

    The question really is to tighten the prism from its unity container The connected is UniBootStrapper which comes with the IoC Container which is already set with the Prism stuff like EventAgegator. But is there a similar bootstrap in a StructureMap that I can use - to configure the required prism class?

    Is it a suggestion to do this, or am I better than sticky in unity? What are Downsides and Upsides?

    It is definitely possible that you need to do 2 things:

    1. Create a new Bootstrap (StructuredMap Bootstrap).
    2. Create an implementation of ICTenerFatch which uses StructuredMap.

    In reality no unity specific features are being used, it has been made mutable. Here is an example of a ninety replacement:

    This is your replacement Must be a good model for


    data binding - WPF ItemsPanelTemplate not working -


    मैं एक ListBox के लिए काम कर रहा हूँ ItemsPanelTemplate ListBox का उपयोग किसी DataTemplate में किया जाता है, और मेरी कोई भी निहित ListBox शैलियां डिफ़ॉल्ट दृश्य शैली को ओवरराइड नहीं करती हैं। किसी कारण से, ItemsPanelTemplate मैं नियंत्रण (एक WrapPanel ) को निर्दिष्ट करने के लिए निर्दिष्ट कर रहा हूं और इसे StackPanel के बजाय उपयोग किया जाता है।

    यह संपूर्ण टेम्पलेट है, मैं केवल मान सकता हूँ कि मुझे याद आ रही है जो इस वजह से पैदा हो रहा है।

      & lt; डेटाटामप्लेट एक्स: कुंजी = "ग्रुप लर्जआईकंसटेम्पलेट" डेटाटाइप = "{x: प्रकार कोर: IGroup}" & gt; & Lt; लिस्ट बॉक्स आइटमस्सोर्स = "{बाध्यकारी बच्चे}" ओवरराइडडिफ़ॉल्ट स्टाइल = "ट्रू" & gt; & LT; ListBox.ItemsPanel & gt; & LT; ItemsPanelTemplate & gt; & Lt; WrapPanel क्षैतिज अनुरेखण = "वाम" कार्यक्षेत्र अनुरेखण = "शीर्ष" IsItemsHost = "True" ScrollViewer.HorizontalScrollBarVisibility = "Disabled" ScrollViewer .VerticalScrollBarVisibility = "Auto" Width = "{बाध्यकारी (फ्रेमवर्क एलेमेंट। ActualWidth), RelativeSource = {RelativeSource AncestorType = ScrollContentPresenter }} "/ & Gt; & Lt; / ItemsPanelTemplate & gt; & LT; /ListBox.ItemsPanel> & LT; ListBox.ItemTemplate & gt; & LT; DataTemplate & gt; & LT; DataTemplate.Resources & gt; & Lt; conv: IconConverter x: कुंजी = "IconConverter" / & gt; & LT; /DataTemplate.Resources> & Lt; स्टैकपैनेल मार्जिन = "2" चौड़ाई = "100" ऊँचाई = "140" & gt; & Lt; छवि स्रोत = "{बाध्यकारी चिह्न, कनवर्टर = {स्टेटिक संसाधन आईकॉन कननवर}, कनवर्टर पैरामीटर = 96}" / & gt; & Lt; टेक्स्टब्लॉक टेक्स्ट = "{बाध्यकारी नाम}" टेक्स्टवॉपिंग = "लपेटें" टेक्स्टट्रिमिंग = "कैरेक्टरप्लेप्स" / & gt; & Lt; / StackPanel & gt; & Lt; / DataTemplate & gt; & LT; /ListBox.ItemTemplate> & Lt; / ListBox & gt; & Lt; / DataTemplate & gt; मेरा अनुमान है कि WrapPanel में चौड़ाई की संपत्ति इसे एक स्टैकपैनल के रूप में व्यवहार कर रही है। । 


    .net - socket queue problem? -


    I am a dotnet programmer Recently I wrote an Excel server server application that connects to system.net.sockets Uses and checks the client running with the timer, who send the byte to MinesView to check the live. When a client is disconnected, I turn off the socket and turn it off. This work is fine, but when the number of subscribers increases, the connection can not be established and the problem has arisen. I use backlog with a price of 2000, but I'm not working properly? help me!

    It is very vague, some more detail (errors that you are getting on the client, and / or Server) or some code (how are you accepting connections on the server?) Can help.

    In the meantime, I will put you some random estimates ...

    If you are creating and destroying connections quickly with your customers, and you have many customers on the same machine If you are testing your server by running then you may suffer from running out of sockets due to TIME_WAIT . Similarly, if you are testing your windows with a lot of client connections (usually over 4000) from the same Windows machine, then you will be running in the default MAX_USER_PORT settings, which are concurrently Limit the number of outbound connections which you can do once.


    database - How to connect to remote Oracle DB with PL/SQL Developer? -


    I have a database "test" for which I am connected at address 123.45.67.8 9/1521.

    How do I connect it using PL / SQL Developer?

    I would recommend creating a TNSNAMES.ORA file. From your Oracle client install directory, navigate to \ Admin \ You already have a file called TNSNAMES.ORA, if it needs to be edited, then create it using your preferred text editor.

    Next, just add an entry like this:

      MYDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 123.45.67.89) (Port = 1521 ) (CONNECT_DATA = (SID = test) (server = defined)))  

    You can change MYDB for your choice, it is the identifier that applications receive information from the database Will use to find it with TNSNAMES.

    Finally, login with MYDB as your database in PL / SQL Developer. It should automatically get the connection string in TNSNAMES.ORA.

    If that does not work, then help-> hit - after that click on the "I" icon in the upper-hide corner. The fourth tab is the "TNS name" tab, check to confirm that it is loading the appropriate TNSNAMES.ORA file. If it is not, you may have more than one Oracle installation on your computer, and you will need to use it which is in use.


    python - Why is using 'eval' a bad practice? -


    I am using the following class to easily store your song data.

    "class": "class" to store the description of each song "attsToStore = ('name', 'artist', 'album', 'style', 'location') Def __init __ (self): for att in self. AttsToStore: locals () def setDetail ('self' in the key, val) 'exec' itself.% S = None '% (att.lower ()): if self.attsToStore: exec' self.% S = val ' % Local people (key.lower ())

    I think this is more expandable than writing a if / else block However, Eval is considered to be a bad practice and unsafe to use. If so, can someone explain to me and show me a better way of defining the class above?

    Yes, using eval is a bad practice for some reasons:

    1. There is almost always a better way to do this
    2. Very dangerous and unsafe
    3. Debugging makes it difficult
    4. Slow

    In your case you can use instead:

      class song: "" "class to store the details of each song" "AttsToStore = (' Name ',' artist ',' album ',' style ',' location ') def __init __ (self): For the att .stostor: setetter (self, et.) Def setDetail (self, key, val): If there is a key in itself.Testor: setattr (self, key.color, wal)  < / Pre> 

    Edit:

    There are some cases where you have to use an acoust or an app. But they are rare. Using Aval in your case is definitely bad behavior. I emphasize bad behavior because eval and exec are often used in the wrong place.

    Edit 2:

    It seems that some disagree that eval is 'very dangerous and unsafe' in OP case. This can be true for this specific case but in general no question was normal and whatever I have listed is also true for the general case.

    Edit 3: Reorder Point 1 and 4


    How do I find the natural size/dimensions of a Flash SWF file? -


    I have been given a Flash file ( .swf extension) to put a web page . Opening the file in my browser makes it quite blurred, so I assume that there is a natural shape for the file, similar to an image.

    It is also rectangular, so I should work in aspect ratio. I do not have the exact size. How do I find this information?

    I was wondering how to get this out last night I could not find anything on Google, but Then I remembered that PHP's getimagesize works on SFF movies:

      & lt ;? Php $ file = "YOUR_FILE.swf"; $ Info = getimagesize ($ file); $ Width = $ info [0]; $ Height = $ info [1]; Print "{$ width} x {$ height} \ n"; ? & Gt;  

    Parsing node-specific XML Using JQuery -


    There are many other terms related to this, but I can not find the answer to my question. I am trying to parse the XML file of the following form to return items only under the 'subGroup' node.

    Here is sample XML:

       

    And what I currently use to parse it:

      $ Get (url, {}, function (data) {$ ('item', data) .each (function (i) {var id = $ (this) .find ("id"). Text (); var title = $ (This) .find ("title"). Text (); var description = $ (this) .find ("description"). Text (); list.append ('
  • gt;' + id + ':' + Title + ':' + description + '& lt; / li & gt;';)}};});
  • The problem is that items listed under 'Result group' are also selected by $ ('item', data). I appreciate it if someone can choose only those elements under a specific node, in this case the 'sub group' node.

    Thank you in advance for your help!

    $ (use 'sub group' item ', data)


    mapping - TFS build-server build of branch? -


    We have a TFS 2008 project with two branches ("Main" and "Newfuture"). Each source code has a complete, independent "copy" (version).

    By changing workspace mapping, we can either mapping the version on our local PC and working with both the branches with both problems.

    However, if I set up mapping to switch to our build server on the newfire branch (which should be swapped in the newfire source code without changing anything which is related to the buildform) Errors are found: There is no work folder mapping for

    $ / Main / Product.sln

    when it is made up of the newfactor branch Still looking at anything in the Main branch, even if this Khana should have no reference anywhere in the source code. It seems that there is no reference caching for Maine !!

    I have a completely clean build (removed the build folder from the server and / p: Fly through the mapping server to run the build with ForceGet = true, and on any server There is also no file that can cache the workspace binary), but it does not help.

    Any suggestions?

    Verify that:

    • $ (SolutionToBuild) is a relative Path uses when the product.sln refers to
    • The relative path between the $ / newfire /.../ TFSBulged. Proj and $ / newfactor / product. Sln is similar because it is the main branch Is in.

    / edit

    Note, however, it is important to not not that $ / main and $ / branches / feature trees in a hierarchy At the same level, there should be local path on the build path. * What is under each branch in all these cases if content is intrinsically consistent then all your existing build scripts should work without modification.

  • <
  • My method is not the only way, but I can prove that it works better than all other changes made by me over the years :) < / P>

    * Clearly, trying to facilitate team builds can be a lot more painful than the proposed restructuring for your MSBuild script, You have to keep somewhere ... If you own> 1 build server (or may be in the future) then you have to consider the strategy of deployment of a change ... you need the meta-SCM process to get your SCM process management of!


    c - Printf produces wrong integers -


    I'm learning something for a few days and when I use Printf to change the temperature, it displays incorrect output Does.

      int main () {char sys; Int temporary; Printf ("Enter a Tempature System [C or F]:"); Scanf ("% c", & sys); Printf ("Enter a Tempature:"); Scanf ("% s", and temp); If (sys == 'f') {int output = (temp - 32) * 5/9; Printf ("% d Fahrenheit% d Celsius \ n", Temp, Output); Return 0; } And if (sys == 'c') {int output = temp * 9/5 + 32; Printf ("% d celsius% d fahrenheit \ n", temp, output); Return 0; }}  

      scanf ("% s", and temporary);  

    % s is for the format specifier wire. You are reading in an integer, so you want % d .


    filtering - Band pass implementation matlab -


    I have 2 raw signals measuring vibration of rotating shaft between X and Y const, speed 633.33 Hz, my goal is only for them Specific frequency components (say 1X or .35X) and plot classes (plot against the Y signal for the X signal) is to be removed. I took a raw signal and I applied the following pass filter using the Butterworth filter. This gave me a smooth sign in the time domain. Now when I am trying to apply the Butterworth band pass filter between frequency (630 Hz to 640 Hz) that is not working properly I do not know I do it right I am here. The following figure is after the application of the following pass filter (Butterworth).

    Enter image details here

    this buffer lower pass and After applying band pass filter it is another change in the original signal.

    Enter image details here I hope the filter to do something like 1x frequency Cleaner Class is required for components.

    Enter image details here

    My MATLAB code is thus is.

      l = length (x); Signal FS = 2e6 length%; Sample frequency DF = FS / L; % Frequency Window DT = 1 / df; % Time window% calculation time axis t = (0: dt: (L-1) * dt) '; Subplot (3,2,1); Plot (t, x); Subplot (3,2,2) before title ('filtering X signal); Plot (t, y); Title ('Before Filtering Y Signals') Sub-station (3, 5, 5); Plot (x, y); Title ('Classes Before Filtering') X = Detroit (X, 0); By removing% DC offset Y = ditrate (Y, 0); To remove the% high frequency components [B2, A2] = butter (6,5 * 633 / (FS / 2), 'less') the DC offset% is removing the Butterworth short pass filter; DataInX = X; X = filter (b2, a2, data inx); % Filter command filter data INY = y; Y = filter (B2, A2, data in); % Of the butter worth only 1X frequency component [B1, A1] = butter (1, [633 / (FS / 2) 640 / (FS / 2)], 'Bandpass' plot for; DataInX = X; X = filter (b1, a1, data in);% filter command filter data INY = y; y = filter (b1, a1, data in); subplot (3, 2, 3); conspiracy (t, X); Axis tight titles ('X signal after filtering') sub-station (3,2,4); conspiracy (T, Y); axis tight title ('Y signal after filtering') subplot (3, 2) , 6); conspiracy (x, y); title ('phil I am applying myself for reference too. 

    I am new to the filter and DSP world. Any suggestions or suggestions? With signs or ideas, can help correct it?

    After reducing the signal ( I.e. [B2, A2] = Butter (6,5 * 633 / (FS / 2), 'Few');) You can make the sample from 2 MHz to ~ 4 KHz and see a lot of changes in the result In this case d Unsampling will not change for a resolution that has already been reduced.

    After you apply E-lopes, use resellam (X, 1,500) to compress your 2 MHz signal to 4 kHz then you should not have any problems with your narrow bandpass. Be sure to pass new sampling to the filter.

    In addition, if you have full signals available, use filtfilt instead of filtfilt to avoid phase distortion. In this case, you can reduce the filter order a bit, but the fourth order should work fine for loop and bandpass (after recompilation).


    Declaration of Methods should be Compatible with Parent Methods in PHP -


     सख्त मानदंड: childClass :: customMethod () की घोषणा parentClass :: customMethod () 

    PHP में इस त्रुटि के संभावित कारण क्या हैं? संगत

    Code> childClass :: customMethod () के पास भिन्न तर्क हैं, या parentClass :: customMethod ()


    Autoload module class in Prestashop -


    I have created a module that has an extra sensible variable for the FrontControllerCore class for an overdose.

    The problem I'm having is trying to automatically load a class that is referenced in the controller in my module. The square is not being loaded and I do not know how to add it to the autoloader.

    FrontController.php file should be located in the module when installing: Override \ classes \ controller \

    Then from FrontController.php you can manually "include" manually like the file:

      require_once (dirname (__ file __) '/ .. / .. / .. / module / servicecharges / classes / ServiceCharge.php '.);  

    This does not include any autoload.


    javascript - Independent series for highcharts with color and gray background -


    How to series freely with color and brown series If you click the radio button from the Bela example, So the part of the chart becomes gray and the rest are colors

    London - Blue London - Gray

      

    $ (function () {var grayblue = '# 1D1D1D'; var graded = '# 4C4C4C'; data London = [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0 , 59.6, 52.4, 65.2, 59.3, 51.2]; databarlin = [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.3, 46.8, 51.1] Highchartes Done, data Berlin, 0); $ (': input [type =' radio ']' (click on), function () {selected = 12 - $ (this) .val (); tempLondon = []; tempBerlin = {]; For London (data in var i) {bLondon = {}; B-Berlin = {}; if (i> = = selected) {Belyndon ['Y'] = Data London [I]; BLDon ['Color'] = Gray Blue; Temple London. Peash (BLDon);} For FI {Temple London. [I]);}} (Data Berlin in var ii) {bLondon = {}; Beberin = {}; If (i> = selected) {bbreen ['y'] = data Berlin [i]; Beberin ['color'] = graded; TempBerlin.push (bBerlin); } Other {tempBerlin.push (data Berlin [i]); }} Highchartes (Templandon, Temperlin, selected); }); Function High Chart (DataLondon, Data Berlin, Number) {$ ('# Container'). High Texts ({Chart: {Type: 'Column'}, Title: {text: 'Monthly Average Rain'}, Subtitle: {text: 'source:' '' '' '' '' '' ',' ' '' '' '' '' '' '' 'Plus Band: [[Color:' #ADADAD ', to: -0.5, to: number - 0.5}]}, YAxis: {min: 0, title: {text: 'Rain (mm)'}}, Tooltip: {Header format: '& lt; span style = "font-size: 10px"> {point.key} & lt ; / Span & gt; & gt; Table & gt; ', Point format:' & lt; t & gt; td style = "Color: {series.color}; padding: 0" & gt; {series /name> B & gt; & lt; / td & gt; & lt; / tr & gt; ', footer format:' & Lt; / table & gt;, color: ['# 0000ff', '#ff 20000'], plot options: {column: {pointPadding: 0.2, border width: 0}}, series: [{name: 'London ', Data: DataLondon}, {Name: Berlin', Data: Data Berlin}]}); }});


    ios - How I could push to my own view without having to instance itself everytime I do it -


    Im every time I press it, pointing to my own visual class.

    MyOwnView * newSameView = [[MyOwnView alloc] initWithNibName: zero bundle: NULL]; [Self. Navigation controller Push ViewController: Animated MyOwnView: Yes];

    You asked "But do I allocate it every time?" There is no answer. Whenever you create an event, it allocates different memory, but when you close the view controller with the stack, that memory is freed.

    If you want to have an example of your MyOwnViewController class, then create a property "lazy load" a view controller, and use it

    If this is your property: < / P>

      @property (nonatomic, strong) MyOwnViewController * myVC;  

    The recipient will look something like this:

      - (MyOwnViewController *) myVC; {If (_myVC == zero) _myVC = [[MyOwnViewController alloc] initWithNibName: zero bundle: NULL]; Return _myVC; }  

    Then you can write code that suppresses view controller in such a way:

      [self.navigationController pushViewController: self.myVC Animated: yes];  

    The good thing about this is that you only make an example of your MyOwnViewController. The bottom side is that unless the view controller makes such a move it is never released, unless you explicitly set it to zero. If you do not need it at any point, then additional memory (again, unless you manually set the property to zero)

    Another approach is every time a new copy of MyOwnViewController Makes it necessary, and after that it pops out, then it removes it. You do more to create / destroy MyOwnViewController instances, but they do not take memory when you do not use them.


    c++ - Drawing audio spectrum with Bass library -


    How to Can I draw a spectrum for a given audio file ?

    I mean the chart originating from Audacity: Enter image details here < / P>

    I know that I can get FFT data for a given time t (when I play audio):

      float fft [1024]; BASS_ChannelGetData (chan, fft, BASS_DATA_FFT2048); // Get FFT data   

    In this way, every time I get 1024 values ​​in the array for t . Am I right that the values ​​of that array are signal inductees ( DB )? If so, how is the frequency ( Hz ) associated to those values? From the index?

    I am a programmer, but I have not experienced anything with audio processing at all. So I do not know what is necessary, with the data, to plot the necessary spectrum.

    I am working with the version C ++, but examples in other languages ​​are just fine (I can change them).

    From the documentation, the flag will be calculated due to the FFT quantity, and this is linear magnitude .

      db = 10 * log 10 (intensity); DB = 20 * Lose 10 (pressure);  

    (I'm not sure whether the audio file sample is a measure of intensity or pressure. How is a microphone output related?)

    In addition, point to it Does the length of input and length of FFT match, but half FFT (related to negative frequencies) are discarded. Therefore, the highest FFT frequency will be a half sample frequency. It happens in N / 2 Doc actually says

    For example, with 2048 sample FFT, 1024 will return floating-point values. If the BASS_DATA_FIXED flag is used, then the FFT value will be in the 8.24 fixed-point form, whereas floating-point each value, or "bin" from 0 to 1 (can actually go higher if sample data is floating-point And not clap) 1 bin consists of a DC component, in the second, the sample rate of the channel is dimension 1/2048, after which the dimension 2/2048, 3/2048 etc. occurs.

    This is very clear.


    javascript - Angular State Dropdown Bound to Country Select -


    I am trying to get a relevant state dropdown menu which is bound to the country so that only the related state can be displayed.

    But for the solution to my implementation I have seen these two answers.

    I can not get them to work and I'm missing something.

    My favorite solution will use some existing NG filters, but I believe that only works on the array and not the objects

       

    I tried to convert the object to orange, but it did not seem to work.

    I can create a custom filter, but I hope to avoid this hope.

      & lt; Select ng-model = "user.state" ng-options = "state.name by state.id | customStateFilter: user.country.id" & gt;  

    It seems that there should be no way to work ng-options without modifying the data.

    Is there an existing angular filter that works on objects or how to make conditional arguments to dynamically filter objects?

    You have some problems here (in addition to the state.countryid and < With a mismatch of code> country.id :

    First comes after the track by (or, other words The filter comes right after the array, because it filters the array.)

    Second , you are correct - in filter filter only Works on orange, not objects. Custom filters are required.

    and end , filter does not accept an expression to evaluate the filter ( Filters: State.countryid = user.country.id , do not tell that this "expression" that you tried to provide does not compare it to === , but < Code> = ). To match a property to specify object , filter to match a property, either a The string accepts -

    In your case, there is an object you need.

    To keep this thing together:

      & lt; Ng-Model = "selectedState" ng-options = "Name of state for state states. Filter: {countryid: user.country.id}: state track by true.id" & gt; & Lt; Option value = "" & gt; Select state & lt; / Option & gt; & Lt; / Select & gt;  

    twitter - Toolkit for NodeXl in Java -


    Is any device NodeXL (or a program with similar functionality, allowing import graphs from Twitter) Use from java?

    I am currently using the Gappy Toolkit in a Java application, but only allows me to import the graph from my PC, and I want this application to directly get me the graph directly from Twitter can do.

    For this, I am looking for Toolkit which allows me to download a graph from Twitter.

    I have not used anything you can keep a look and The second one provides a link to the GITHB repository so that Twitter can be communicated via its API.


    Why it failed without import in python -


    I am a newbie and I'm just starting to learn Python programming:

      import sys PyQt5 import QtWidgets if __name__ == "__main__": app = QtWidgets.QApplication (sys.argv) MainWindow = QtWidgets.QMainWindow () mainWindow.show () sys.exit (app.exec_ ())  

    When I run the code above, then everything is fine. But when I run the code below, it fails with the following error message: Apps = PyQt5.QtWidgets.QApplication (sys.argv) AttributeError: 'module' object has no attribute 'QtWidgets'

      import sys import PyQt5 if __name__ == "__main__": app = PyQt5.QtWidgets.QApplication (sys.argv) MainWindow = PyQt5.Qtwidgets.QmainWindow () mainWindow.show () sys .exit (app .exec_ ())  

    by the way, my Python version 2.7, I am using Qt5 library and my operating system OpenSUSE 13.2, of course, Distribution of Linux .

    . It does not include anything yourself, and therefore you can not import anything directly from it.

    This is an idea design decision, and is done for a good reason. There may be a total of thirty or more modules in the package, so they will have a heavy up-front cost to load all each time to import PyQt5 . So instead, you only have to pay the cost of loading the required module.

    However, there may be times when you want to do load all the modules at once. For example, it would be very convenient to be able to do this when using the Python interactive session. And in fact, PyQt provides a special module that actually does this:

      & gt; & Gt; & Gt; Py Qt5 import from Qt & gt; & Gt; & Gt; Qt.QWidget & lt; Class 'PyQt5.QtWidgets.QWidget' & gt; & Gt; & Gt; & Gt; Qt.QObject & lt; Class 'PyQt5.QtCore.QObject' & gt; & Gt; & Gt; & Gt; Qt.QNetworkCookie & lt; Class 'PyQt5.QtNetwork.QNetworkCookie' & gt;  

    osx - How to package a standalone xulrunner app for OS X? -


    I am trying to create an Accelerator app for OS X 10.9+. I need it to be a stand alone, i.e. no extra additional software (including firefox) need to be installed on the box with the app.

    How do I guide an up-to-date on it? It seems that I have struck every problem described here:

    One of the last:

    < Pre> $ open MyApp.app to LSOpenURLsWithRole () file failed with error -10810 / path / to MyApp.app.

    Here's one I have done so far:

    How can I make an OS X? App for the modern (v36 +) xulrunner app?

    You are on the right track, just a big problem that you are facing.

    If you run the application from the command line, then you will get some output like this.

      $ Sample Application.ApA / Contents / MacOS / Accelerator Mozilla XULRunner 33.0 Usage: Accelerator [Option] Xulrunner APP file [APP option ...] Option - Specify APP file (optional) -H , --help Show this message -V, --version version - Gray-version GRE version string print Application on stdout APP file Initial file APP option option specific options  

    As We can see Adan Lable did not automatically say like a tutorial to run content / resource / application.ini that it would be a known issue, and the popular action among XULRunner users is that Xulrunner create a stub shell script to pass the required argument for binary.

    There is a script here. 'Just enough to do that is whipped up.

      #! / Bin / s runpath = "` Direeman '$ 0 "`' ContentInender = "` CD "$ Runpath" / .. & gt; / dev / null & pwd "Exec" $ runpath / xulrunner "--app" $ Contentsdir / resources / application.ini " 

    Save this file to your MacOS directory and allow it to be executable For example, I have sampling I will use command here to set executable permissions.

      chmod + x sampling  

    now, modify info.plist to execute & Lt; Key & gt; CFBundleExecutable & lt; / / instead of executing this code instead of xulrunner . Key & gt; & Lt; String & gt; SampleApplication & lt; / String & gt;

    Now when you run your application, it should work. If you are getting an error saying, you want to change the name of the application bundle, or you can follow the advice of that question to avoid the caching problem.

    Bonus information

    You can remove the Content / Framework / XUL.framework directory, and.

    The dependentlibs.list file from content / MacOS to the content / resource directory, though XULRunner 33 without it properly Its going on.


    node.js - Update node app dependency without restarting node app -


    I am trying to create a chat bot to use on twitch.tv to join the IRC, which is typed listens for the given command! Command This will take some sort of action at that point.

    My first thought was to store an item to store the required commands and appropriate responses. If I want to add new commands on the fly then I can do this, There is a way to update the imported commands with the newly added commands without having to leave the connected node server.

    Would it be easy to create a monodod archive, in which commands can be given, every time a new command arrives (I will use mangodb later to store some information with bont )

    Just trying to figure out how best action will be now?

    Database, however, you can use the t Tot Jason File as Usage Database

      var requires JsonDB = ('node-jsan-db'); Var DB = new JasonDB ("command", true); // "command.sonson" var command = db.getData ("/ commands") target file in the same directory; // ... somewhere as a callback ... db.push ("/ command", {test: "test", foo: {bar: ["apple"]}}); Command = db.getData ("/ commands");  

    ruby - return an array of keys from hash when values match pattern -


    I'm trying to run through the following hash

      my_family_pets_ages = {" Evi "= & gt; 6, "hobbi" => 3, "George" => 12, "Bogart" = & gt; 4, "Pali" = & gt; 4, "Annabelle" => 0, "move" => 3}  

    and return an array of keys whose values ​​match a specific integer for ages. So, for example, if I wanted to find all the 3-year-old pets, it would simply return an array of their names.

      ["hoobe", "dito"]  

    I have the following method, but I think I just have to return an array of keys Can not get the method, but I'm getting key = = value in an array like this:

    ["Hoobie" => 3, "Ditto" = & gt; 3]

    Even the method that I have done so far

      def my_hash_finding_method (source, cheese_t_fund) source.select {| Name, age | Name if age == thing_to_find}  

    Any hint? How do I return the keys

    Use the bus, then to get an array matching Keys:

      def my_hash_finding_method (source, cheese_t_fund) source.select {| Name, age | Age == thing_to_find} .keys end  

    See for more information.


    query parameters - Ember.js: extract queryParams object -


    I am using Amber's query parameters:

    query parameters are dynamic, so the base controller Do not know what will be the property like ['q', 'page'] or ['q', 'foo', 'bar'] or any other Can be sequential.

    How do I get the parameter object of the query parameter, so that I can pass it without having to know the actual query in the store.find ('modelName', params) / Can i

    One way to do this would be the following within the controller:

      var params = {}; ('Query prams') Each (function (param) {params [param] = it. Gate (ultimate);}, this); This.store.find ('widgets', params);  

    ... but there must be a more beautiful way to do this.

    I'm not sure that this is better, but what I am currently doing is the following:

    this.store.find ('widget', this.getProperties (this. GetProperties ('queryParams'). QueryParams))

    On this controller All query parameters will take and provide them in the model.find method. I'm not sure that this approach has a negative effect, but it is a little more concise than running on each property.


    php - "Class 'Cpdf' not found" in "develop" branch -


    "itemprop =" text ">

    I'm trying to drag this kind of development into the branch, using the composer:

    < Pre> "Requires": {"dompdf / dompdf": "Dev-Developed"}

    And such a requirement is required:

      requires 'vendor / autoload.php'; Use Dompdf / Dompdf; // If you are defining a composer ('DOMPDF_ENABLE_AUTOLOAD', wrong); Disable DOMPDF's internal autoloader; Define ("DOMPDF_ENABLE_REMOTE", true); // DOMPDF's default configuration requires_once 'vendor / dompdf / dompdf / dompdf_config.inc.php';  

    But I'm getting the error:

      Fatal error: Class 'cpdf' / vendor / dompdf / dompdf / src / dompdf / adapter / CPDF Php line 190  

    on line 190:

      $ this-> _pdf = new \ cpdf ( 

    First of all, I do not use the development branch Please try:

      $ music composer is required "dompdf / dompdf" "0.6 *"  

    or from class add: .?

      & lt; php is required 'vendor / autoload.php /vendor/dompdf/dompdf/lib/class.pdf.php "require_once __DIR__;' (false; ( Define "DOMPDF_ENABLE_REMOTE" true). '; Defined' $ PDF = new cpdf ();  

    issue class is \ cpdf in a namespace If it is not set then the composer does not include it in the code. \ Vendor \ composer \ autoload_classmap.php therefore requires the requirement of .


    javascript - Node.js: Nested setInterval()-Methods - inner one doesn't stop -


    I need an event repeatedly, at the right time in jds. I use process.hrtime () to make a higher resolution than the normal set interval method. NPM-module "Nanotimer" (,) it is set to setInterval () and setTimeOut () .

    as usual. at the same time.

    The code goes as follows:

      var nanometer = essential ('nanotimer'); Var Timer A = Nano Timer (); Var timer B = new nanometer (); Var Index = 0; TimerA.setInterval (function () {console.log ("a"); timerB.setInterval (function () {console.log ("B");}, '3s'); if (index> 10) { Console .log ("stop timer a"); timer; player interval (); console.log ("stop timer b"); timer bclaimer interval ();} index ++;}, '1s');  

    Output:

      AAAABAAABAAABAA stop timer A stop timer B // right here B / timerB continues forever, every 3 Second BB ...  

    I can not find any way to stop the inner timer. Do you have any suggestions?


    jquery - Bootstrap-select does not toggle "open" class -


    please refer to ->

    I downloaded from source, I really do not know why Not to toggle the "open-toggle" to "open" category. I can fix this by adding some messy scripts, but I like the plugin to do the right thing.

    HTML:

      & lt; Div class = "number customdp" & gt; & Lt; Select class = "simple-dropdown" name = "number" & gt; & Lt; Options & gt; 1 & lt; / Options & gt; & Lt; Options & gt; 2 & lt; / Options & gt; & Lt; Options & gt; 3 & lt; / Options & gt; & Lt; Options & gt; 4 & lt; / Options & gt; & Lt; Options & gt; 5 & ​​lt; / Options & gt; & Lt; / Select & gt;  

    Is anyone's solution?

    There is dependency on Twitter Bootstrap. Include files such as your and javascript :

       

    compatibility - cobol application on W8 -


    I have an application written in Kobol that runs with PCS XPSP3 32bit. I changed my PC and now I have Windows 8.1 64 bit I tried to run the program with W8 on the computer but it does not work I also tried with "compatibility troubleshooting" in the property, but it does not work . Do you have a suggestion? TCA lot

    Tip:

    • "Run as administrator"
    • Run Win XP in the virtual machine

    ios - UISearchController Search Box Shift Down on Tap -


    If I apply a UITableVIewController that UISearchBarDelegate, visual embedded inside a navigation controller.

      Class utility viewer: UITableViewController, UISearchResultsUpdating, UISearchBarDelegate, AmenityFilterDelegate {// MARK: - Public Variables var targetFacilities = [Int] () var searchController: UISearchController = UISearchController (searchResultsController: void) // Mark: - Private Variable View Private Violence Model: FeatureTabVyModel! Private education parkGreenColor = UIColor (red: 73/255, Green: 136/255, blue: 84/255, alpha: 1) private var showEmptyMessage = false // Mark: - Show Lifecycle / ** Loading * / override after setup visual function viewDidLoad () {super.viewDidLoad () trackScreenView ( "see the feature table") If targetFacilities.isEmpty {ViewModel = FacilityTableViewModel ()} else {ViewModel = FacilityTableViewModel (facilityIds: targetFacilities)} // Seup search controller searchController .searchResultsUpdater = Self SearchController.dimsBackgroundDuringPresentation = false searchController.hidesNavigationBarDuringPresentation = false searchController.searchBar.frame = CGRectMake (self.searchController.searchBar.frame.origin.x, searchController.searchBar.frig.origin.y, searchContr Oller.searchBar.frame.size.width, 44) SearchController.searchBar.tintColor = UIColor.whiteColor () searchController.searchBar.barTintColor = parkGreenColor searchController.searchBar.translucent = false self.definesPresentationContext = true tableView.tableHeaderView = searchController.searchBar}  

    "Before Tap on Search"

    I found that when I navigation bar of translucent property search box disable

    after tapping Search

    If I set the defined rendering preview = false , the search bar is too low Not known, although I enter text into the search box and he selects one of the results which can not open a modal window. I get the following error:

    search results

      2015/03/17 15: 06: 56.101 VB ParkFinder [16,368: 2,667,719] Warning: Attempting to present & lt; UINavigationController: 0x7fa2f9ced930 & gt; On & lt; VB_ParkFinder.FacilityTableViewController: 0x7fa2f9c27ba0 & gt; Which has been already presented (zero)  

    Below is my segue code:

      prepareForSegue override function (segue: UIStoryboardSegue, this: AnyObject) {NavController go = Segue.destinationViewController as UINavigationController if segue.identifier == "facilityDetailsSegue" {detailsViewController = navController.childViewControllers as Provide Feedback as ViewViewController Index Path = tableView.indexPathForSelectedRow () {var Feature ID: Int If searchController.active {facilityId = viewModel.idForSearchResultsAtIndexPath (IndexPath)} else {facilityId = viewModel.idForilityAtIndexPath (indexPath)} detailsViewController.currentFacilityId = facilityId}} and if segue.identifier == "Fi lterPopover "Amenit YFilterTableViewController as {Aftivisi = navController.childViewControllers.last aftvc.delegate = self}}  

    I'm lost as to what to do. I want to turn off the navigation bar transit and I should be able to launch a modal window from the search results. Any ideas on how to accomplish this?

    I had a single problem, but take a look

    This solves my problem.

    It seems that it can be marked as a duplicate, not to make sure how to do it.


    Spring batch admin and starting Master/Slave jobs -


    Is it possible to configure spring batch administrator to start master and slave jobs? We have a process in the form of master and 3-4 slave nodes.

    The spring batch administrator is running in separate JVM process, but all the spring batch jobs are using the same batch DB schema. Spring Batch Admin has the ability to launch locally deployed jobs.

    So when you can start a job that has master / slalge configuration, the work of the master should be positioned at the local level. You can increase things to launch remote jobs, but you have to wire things yourself.

    It is being said, Spring XD () is a distributed runtime that is able to launch remotely employed jobs.


    recursion - DocumentDB call stored procedure from another stored procedure or itself -


    क्या दस्तावेज़डीबी दस्तावेजों के विरुद्ध संग्रहीत कार्यविधियों को पुनरावर्तित करने के लिए कोई तरीका है (या अगर यूडीएफ भी काम करेगा)?

    हमारे पास एक ऐसा दस्तावेज़ है जो कुछ ऐसा दिखता है:

      {"docID": "my_id", "owner": "fred", "items": [{"itemID": "1", "प्रकार": "आइटम", "मूल्य": 3}, {"आइटम आईडी": "2", "प्रकार": "समूह", "आइटम": [{"itemID": "2.1" "प्रकार": "समूह", "आइटम": [{"आइटम आईडी": "2.1.1", "प्रकार": "आइटम", "मान": 2}, {"आइटम आईडी": "2.1.2", "प्रकार": "आइटम", "मान": 4}]}, {"itemID": "2.2", "प्रकार": "आइटम", "मान": 1}]}}}   

    किसी भी समय हमारे पास "आइटम" है, वह "आइटम" a राइ में ऐसी प्रविष्टियां हो सकती हैं जो "type": "item" और "type": "समूह" का एक मिश्रण है। प्रविष्टियां जो "प्रकार": "आइटम" के पास एक सरल "मान" फ़ील्ड है जिसे समझा जाना चाहिए प्रविष्टियां जो "प्रकार": "समूह" के पास एक "आइटम" सरणी हैं ... और इतने पर। सिद्धांत रूप में, पुनरावृत्ति के स्तर पर कोई सीमा नहीं है, जिसे मैं मानता हूं एक समस्या है, लेकिन व्यवहार में, स्तर शायद ही कभी 4 या 5 गहरे से नीचे हो जाएगा।

    स्यूडोकोड के लिए जो मैं कोशिश कर रहा हूं लिखते हैं ऐसा कुछ दिखता है:

      फ़ंक्शन योग (वस्तुओं) {int total = 0; प्रत्येक आइटम (वस्तु में आइटम) के लिए (यदि (item.type == "आइटम") {कुल + = item.value; } और {कुल + = योग की राशि (आइटम.इटम); }} कुल वापसी; } समारोह sumAllValues ​​() {var ctx = getContext (); Var coll = ctx.getCollection (); Var प्रतिक्रिया = ctx.getResponse (); // मालिक के द्वारा डॉक्स के लिए क्वेरी var filterQuery = 'SELECT * FROM docs d जहां d.owner = \\\ "fred \\\"'; Var done = coll.queryDocuments (coll.getSelfLink), filterQuery, {}, फ़ंक्शन (गलती, डॉक्स, विकल्प) {यदि (गलती) नए त्रुटि ('त्रुटि' + err.message); var total = 0; Docs .for ईका (फ़ंक्शन (डॉक्टर) {कुल + = योग योग) ();;); प्रतिक्रिया .सेटबॉडी ('कुल:' + कुल);}); }  

    क्या ये भी संभव है? DocumentDB एक sproc को दूसरे sproc से बुलाते हुए समर्थन करता है? क्या एक स्प्रेक कॉल ही हो सकता है?

    मुझे कुछ दस्तावेज़डीबी संग्रहीत कार्यविधि संदर्भ ऑनलाइन मिल चुके हैं, जिनमें से और कई अन्य पृष्ठों की मेजबानी भी शामिल है।

    यदि यह संभव है, तो मुझे लगता है कि किसी भी तरह से एक स्प्रेक को कॉल करने के लिए संग्रह को पूछना है, जिसे मैं कॉल करना चाहता हूं, और फिर किसी एक शब्द के साथ सीधे कोड के रूप में सीधे sumTotals () को कॉल करने की बजाय स्प्रेक का संदर्भ देता हूं।

    हम सिर्फ DocumentDB के साथ प्रोग्रामिंग को देखना शुरू कर रहे हैं, इसलिए हम पूरी तरह से सुनिश्चित नहीं हैं कि हम इसके साथ अभी तक क्या कर सकते हैं। किसी भी सहायता या सलाह के लिए धन्यवाद।

    मुझे लगता है कि आप सही रास्ते पर हैं।

    हालांकि, आप एक संग्रहीत कार्यविधि के अंदर जेएस फ़ंक्शन को परिभाषित कर सकते हैं, जो हो सकता है उस संग्रहीत कार्यविधि के भीतर से संदर्भित, बुलाया जाता है, और पुन: उपयोग किया जाता है

    इस मामले में, अपने sumValues ​​() फ़ंक्शन को माता-पिता sumAllValues ​​() संग्रहीत कार्यविधि (केवल swapItems () की तरह परिभाषित करें) उदाहरण आपने उल्लेख किया है।)

      फ़ंक्शन sum allvalues ​​() {var ctx = getContext (); Var coll = ctx.getCollection (); Var प्रतिक्रिया = ctx.getResponse (); // मालिक के द्वारा डॉक्स के लिए क्वेरी var filterQuery = 'SELECT * FROM docs d जहां d.owner = \\\ "fred \\\"'; Var done = coll.queryDocuments (coll.getSelfLink), filterQuery, {}, फ़ंक्शन (गलती, डॉक्स, विकल्प) {यदि (ग़लती) नया त्रुटि ('त्रुटि' + त्रुटि संदेश) फेंकें; var total = 0; docs .for ईका (फ़ंक्शन (डॉक) {कुल + = योग राशि (डॉक्टर। इमेजेस);}); प्रतिक्रिया .सेटबॉडी ('कुल:' + कुल);}); समारोह योग (वस्तुओं) {int total = 0; Items.for प्रत्येक (समारोह (आइटम) {यदि (item.type == "आइटम") {कुल + = item.value;} और {कुल + = योग की राशि (item.items);}}); कुल वापसी; }}  

    आप उस तर्क के लिए यूडीएफ भी परिभाषित कर सकते हैं जिसे आप कई संग्रहीत कार्यविधियों और प्रश्नों में साझा और फिर से उपयोग करना चाहते हैं।


    html - all elements in class show as even -


    On my webpage there is a DIV that is dynamically created with the class of Java. I want to change the color of every other movement of the class.

    I am trying to do it this way:

      .JOUT: nth-child (even) {background: #EFF; } .jOUT: nth-child (Strange) {background: #cccffe; }  

    My HTML is as follows:

      & lt; Div id = "outData" & gt; & Lt; Input type = "hidden" name = "outdiver" value = "-------" & gt; & Lt; Div class = "jOUT isOAAQU" & gt; & Lt ;! - ... - & gt; & Lt; / Div & gt; & Lt; Input type = "hidden" name = "outdiver" value = "-------" & gt; & Lt; Div class = "jOUT isOAAQU" & gt; & Lt ;! - ... - & gt; & Lt; / Div & gt; & Lt; Input type = "hidden" name = "outdiver" value = "-------" & gt; & Lt; Div class = "jouT" & gt; & Lt ;! - ... - & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

    Full HTML

    But it's not working What's really weird is that when using the console in Chrome, I select each jOUT , It shows them all as "even" attribute I'm sure I have an invalid CSS or HTML, but I can not find it. I am doing something, but what? I think what I am asking is, there is an idea of ​​place to start looking for this problem. I have validated the CSS using w3c CSS validation, and have used HTML using HTML teddy.

    This will work here:

      .jOUT: nth-child (4n) {background: #EFF; }  

    It is somewhat delicate, though. The better element is to add an optional style class on those elements, probably through your server-side app.