Monday, 15 March 2010

Connect to web service in MS Access with VBA -


Is it possible to connect to a web service via VBA (for example, send an HTTP request) Microsoft Access? For example, if a user clicks on a button on a button, an HTTP request is sent to a web service that responds with OK .

Has anyone done this before?

Note: VBA, not VB.NET.

This code I have used quite successfully with Access 2003 It is from the interwab, copied and re-copied age first. It creates one, sends an HTTP GET request, and returns the result as a string. XMLHTTP = CreateObject ("MSXML2.XMLHTTP") XMLHTTP as a public function http_Resp (ByVal sReq as String) as a string dim byteData () object set as a byte dim XMLHTTP. Open "GET", sReq, False XMLHTTP.send byteData = XMLHTTP.responseBody Set XMLHTTP = None http_Resp = StrConv (byte data, vbUnicode) termination function

sReq URL; Function Responds You may need to ensure that ActiveX Data Objects are enabled under your reference (in the VBA editor, go to Tools> References).

Pass polymorphic type as argument in SoapUI when using ServiceKnownType in WCF Service -


I have a WCF service; There is an operation in this service, which receives the type of logic request . This is the only base type, and while calling the operation, we actually send the value of Request_V1 (which is inherited from request ) on which the full implementation of the request I want to send i

When trying to test the service of using soap, I am able to create complex type variant Request_V1 (by adding proper namespace) , But for some reason, the service is getting value such as it request type.

Reading about the service , I found out that I must clearly specify this succession in the client

Thanks

You must also specify the type in the SOAP message. For example

  & lt; Request I: type = "d: RequestV1" & gt;   

...

Where I am defined as XML-instance namespace

sql - Simple Where Exists vs. In -


I can not see what I'm missing for my life but someone can tell me why the query that first I do not want to, but the second thing works fine? I know that the questions are not exactly the same, but they should return the same 20 rows and they do not do that. (Query fill the top 20 most common items in a table)

  Choose rx.drug_class different from Rx where exists (Select the top 20 rx2.drug_class, COUNT (separate rx2.pat_id) Calculate , More than rank (), according to the order (different-pat_id), RX as RX Rx 2 - when the line given below is commented - this subquery gives the correct answer where rx .drug_class = rx2.drug_class group rx2.drug_class)   

this works fine

  choose rx.drug_class different from RX where In the rx.drug_class (select the top 20 rx.drug_class from the Rx group) 

Where the subdivision present in the novel is not working, what gives?

However, if you are specifying a line number for the first query, you still have to ORDER BY This line number is required:

  where rx.drug_class = rx2.drug_class group rx2.drug_class order by rn   

Als o I am assuming that this is just a simplified example, because the following will be as good as the following:

  Select the top 20 from RX group from RX group. Specific   

Edit:

Your EXISTS will also not work because you are limiting their limitations in the internal before Before you count your ..., set the line in the external set to SELECT then in that case the line will always be present in the top 20 count.

IN works because it is a set of calculations for all rows ... EXISTS fails because every individual line in the external set Is being counted for .. Therefore, every line in the outer set is in the top 20 digits, when those numbers are limited to only the external line's drug_class .

containers - When will Docker be launched? -


I need a tool to finish the odd payload in standard containers, and give them a strong guarantee of isolation and duplication Running on any server with.

When will the dock be launched ??

It has been launched a few minutes ago!

You can reach the team at IRC # Dockkor @ Ferro.

c++ - Call child virtual function from parent -


Please help me I am not really good at polarity, I have classes inherited from other classes.

EDIT: Sorry, completely my mistake Even I have spent about 2 hours to find the problem. People who are interested (thanks for all help)

  if (type.compare ("TEST1") == 0) Results = New Test (id, database); If (type.compare ("TEST2") == 0) Results = New Test (ID, Database); If (type.compare ("TOR") == 0) results = new tow (id, database);   

"== 0" was completely unavailable.

  class A {public: go to zero (do);} virtual zero () {printf ('a');}} class b: public A {virtual zeros ( (Printf ('B');}} int main {A * obj = new B (); obj- & gt; Go ();}   

Result 'A' No '

After that I make it 'b' How can I manage? I covered some things to compile it:

  #include & lt; stdio.h & gt; class A {public: virtual zero DO) { Printf ("a");} zero go () {DO ();}}; Class B: Public A {virtual zero DO () {printf ("B");}}}; int main () {A * obj = new B (); obj-> Go (); Return 0;} < / Code>  

( do is a keyword; printf does not require char, main brackets, And gives an integer)

This has ever produced B for me regardless of the optimization level:

  $ G + + heirs CPP-O beer end & amp; ./inherit b $ g ++ inherit.cpp -O1 -o war & amp; ./inherit b $ g ++ inherit.cpp -O2 -o war & amp; ./ Inherit B $ G ++ Beerius CPP-O3-O Bear End End; ./inherit b $ g ++ inherit.cpp -O4 -o war & amp; ./inherit b $ g ++ inherit.cpp -O5 -o war & amp; However, it is possible that you have filed a case of edge in your compiler, which has to go to  do ()  inside  ()   

.

.net - Waveform Analysis in C# -


I am working on a research project that includes wave analysis of bird call. Basically what needs to happen is that we will identify the 'Baseline' bird call audio files that represent specific types of calls, and then compare those collected samples with those basic files, to determine whether This is a match for a specific type of call. Since our team members are doing this manually, so it is incredibly time consuming, I think we can automate this process, but I'm not sure that the best place to start. I have seen some articles discussing FFT, NI has seen Measurement Studios (very expensive for the enterprise version) and some other thread, but nothing seems to hide as a viable solution.

Did something like this in C #? Is there an underlying library for .NET for wave analysis? Am I stumbling in acoustic fingerprinting with this idea?

Any help is appreciated.

I do not know about any libraries that you are actually doing after that. Maybe a math library is enough with the necessary features? If so, I have used FFT capabilities very successfully in the past.

Auto-generate JPA XML mappings from clean Java classes / POJOs using library/tool -


I am currently working for a customer who developed many clean, non-annotated Java POJO domain models. Each domain model has approximately 15-50 classes. So far, these Java Pojo domain models are only used in Android apps. My clients are undertaking a new project, it is necessary to use these domain model server side, and it is necessary to save the examples of your classes in a SQL database.

We will use JPA for this. Since the jar needs to be reused in the current Android app, using JPA annotations is not an option. Therefore, I have to make JPA XML mapping for these 100+ sections.

I was wondering: Can JPA XML Mapping using some lib / tools generate XML mapping from clean Java classes / POJO? When I started looking up, I thought I was getting "Jahomodel 2 JPAP XML Mapping" tool very quickly, but so far, there was no luck, and I was only looking a while ago.

For me, it seems that a device that will be useful in many scenarios, so I can not believe that it is not in existence.

I know that equipment like HBM2 Java, I know that it is possible to make POOOS / ORM mapping from DDL and POJOS / DDL with an ONR Mapping. But I need Om mapping which has been given to POOs.

In addition to this, I know that JPA XML Mapping can automatically map very little and simple / original properties. I know that I will not have to map every single property, but still, if I do not find such a tool, then I have to face the repetitive work.

So, there is a "Javmoldel 2 JPA XML Mapping" tool?

Maybe stupid idea but how about the back / proxy about back generators. Files with JPA JPA @ Annotation Tag Big show stops may be that your app should use the JPAC customer type, which is not real. Just one suggestion does not kill the Messenger.

  @Entity @Table (name = "customer") public class increases the JPC customer customer {@Id @ generatedValue (strategy = GenerationType.INDNTITY) public long GetId () {return super. GetId (); } Public Zero Set ID (Long ID) {Super .setId (ID); } @column (name = "name") public string getName () {return super.getName (); } Public Zero Setname (strings) {super.setName (s); } // ElementClonen offers simple EkTam linking in OpenJPa. // Insert column.name = @ElementCollection (fetch = FetchType.LAZY) @CollectionTable (name = "cust_role", joinColumn = {@ JoinColumn (name = "cust_id")}) @ column in the hair table (name = "role ") Public listing & lt; String & gt; GetRoles () {return super.getRoles (); } Public Zero centrum (list & lt; string & gt; roles) {super.setRoles (roles); } ...}    

javascript - get unique elements count jquery -


मेरे पास निम्न HTML है

  & lt; input type = "hidden" name = " Product_id "value =" 1 "class =" product_id "/ & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "उत्पाद_आईडी" मान = "2" वर्ग = "उत्पाद_आईडी" / & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "उत्पाद_आईडी" मान = "5" वर्ग = "उत्पाद_आईडी" / & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "उत्पाद_आईडी" मान = "1" वर्ग = "उत्पाद_आईडी" / & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "उत्पाद_आईडी" मान = "2" वर्ग = "उत्पाद_आईडी" / & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "उत्पाद_आईडी" मान = "2" वर्ग = "उत्पाद_आईडी" / & gt;   

मैं गिनती का अद्वितीय तत्वों (तत्वों का अद्वितीय मूल्य) कैसे प्राप्त कर सकता हूं?

क्या यह संभव बिना पाशन ?

अपेक्षित परिणाम:

  अद्वितीय आईडी संख्या ---------------- - 1 2 2 3 5 1  

मैंने जो कोशिश की है वह नीचे की तरह कुछ है, लेकिन इस दृष्टिकोण के साथ समस्या यह है कि यह सभी तत्वों को लूप कर देगा। जैसा कि आप देख सकते हैं पहले पुनरावृत्ति पर हम product_id की 1 की गिनती को समझ सकते हैं, इसलिए इसे किसी भी अन्य तत्व को समान product_id के साथ छोड़ना होगा। मेरे पास तत्वों का गुच्छा है और मैं सभी तत्वों को पाशन पसंद नहीं करता।

  $ ("। Product_id")। प्रत्येक (फ़ंक्शन () {// चेक करें और COUNT को चेक करें यह कुछ समय के लिए)};   

अपडेट:

इसका ठीक नीचे उतरना है, लेकिन यदि आप उस नीचे वोट के लिए एक टिप्पणी डालते हैं तो यह बहुत मददगार होगा। मैं विशेष रूप से बिना पाशन के रूप में निर्दिष्ट करता हूं क्योंकि मैं हालांकि यद्यपि कुछ समय के लिए jQuery के शक्तिशाली सीएसएस चयनकर्ताओं के साथ संभव हो सकता है।

आप किसी ऑब्जेक्ट की कुंजी के रूप में मानों का जमाण कर सकते हैं - & gt; गिनती जोड़ी, हालांकि यह तत्वों पर बिना पाशन किए बिना किया जा सकता है, चाहे यह स्पष्ट लूप या सहायक कार्य जैसे .each :

  var count = {}; $ ('। Product_id') प्रत्येक (फ़ंक्शन () {count [this.value] = count [this.value] + 1 || 1;});   

तब आपको गिनती किए मूल्यों पर पुनरावृत्त करने के लिए फिर से लूप करना होगा।

जब आप सकता है एक समान चयन से मेल खाने वाले सभी तत्वों को गिनने के लिए एक jQuery चयनकर्ता का उपयोग करें, यह वास्तव में प्रत्येक तत्व पर बस चलने की तुलना में काफी कम कुशल होगा। यहां प्रस्तुत कोड ओ (एन) है, लेकिन प्रत्येक नए अद्वितीय मूल्य को खोजने का वैकल्पिक एल्गोरिथ्म और फिर यह गिनती कि यह कितनी बार होता है, लगभग ओ (एन ^ 2) होगा

jquery - A circle being drawn when hover over div -


I have examined this question, I have received some answers, but in fact I do not need it.

I'm not really experiencing with jquery, but I already made the hover function! When I hover on div, this size will change What do I want to add to this effect: On the same hover, an image will be pulled around.

I have already seen such answers where people add box-radius. But what I see is that you are actually dragging the circle, an example of 0:49 sec (this is a little random but this video shows the effect I have):

I hope this is possible!

My code:

  $ ('li # balk1'). Css ('conversion', 'conversion', 'scale (1.2)');}, function () {$ ("advertising"). Css ('conversion', 'scale (1) ');});   

".ad"

around Check it should be a circle or it is also available as a

use of SVG stroke properties. We animate the SVG line generated from a rand deputy imperfect Bazier curve. I think this should be very close to you.

jQuery and D3 Dependencies

  & lt; Style & gt; Path.ln {stroke-width: 2px; Stroke: # 999; Fill: None; Vector-effect: non-scaling-stroke; Stroke-dashehra: 1000; Stroke-Doss Offset: 1000; Webkit-Animation: Dash 4S Cubic Bezier (0.45,0.3,0.35,0.3); -MOZ-Animation: Dash 4S Cubic Bezier (0.45,0.3,0.35,0.3); -O-Animation: Dash 4c Cubic Bezier (0.45,0.3,0.35,0.3); Animation: Dash 4S cubic Bezier (0.45,0.3,0.35,0.3); } @ Keyframe dash {from {stroke-dashoffset: 0; }} & Lt; / Style & gt; & Lt; Script & gt; Function Path (min_rad_delta, max_rad_delta, el_min, el_max, el_min_delta, el_max_delta) {var d = Math.sqrt (0.5 * 0.5 + 1 * 1), r = 1; // gives the square root of a number var el = (L_man + Math. Random) * (el_max - el_min)) * Math PI / 180; Var path = 'm' + [r * math. (L), R * Math Kos (L)] + 'C' + [D * R * Math. (L + Math.LN2), D * R * Meth Chaos (L. Math.LOG10E)]; For (var i = 0; i <4; i ++) {L + = Math PI / 2 * (1 + L_mina_Dilta + Math.Randum) * (L_Max_Delta - L_Money_Delta)); R * = (1 + min_rad_delta + Math.random () * (max_rad_delta - min_rad_delta)); Path + = '' + (I'S ':' ') + [D * R * Math Sin (L - 0.45), D * R * Math Kos (L - 0.45)]; Path + = '' + [r * math sin (l), r * math kos (l)]; } return path; } Function cx (lambda_man, lambda_max, l_man, l_max) {var el = (L_man + Math.rendum) * (L_MX-L_man)); Rotate 'Rotate' ('+ L +') '+' Scale (1, '+ (Lambda_man + Math Random) * (Lambda_max - Lambda_min))' + 'Rotate' + '(' + (-L) + ' ) '; } & Lt; / Script & gt; & Lt; Svg id = "circle" width = "50%" height = "75%" visible box = '- 1.5 -1.5 3 3' & gt; & Lt; / Svg & gt; & Lt; Script & gt; D3.selectAll ('svg') .append ('path'). Classified ('ln', true) .attr ('d', path (-0.1,0, 0,360, 0,0.2)) .attr ('transform', cx (0.6, 0.8, 0, 360)); SetTimeout (function () {location = ''}, 5000) & lt; / Script & gt;    

how to start compass using a batch file -


Hello Can anyone tell me how to use a batch file?

  cmd .exe / k "cd: \ ruby200-x64 \ bin \ & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp ;umpামী; c:" compass clock "e: / project / html /"  

But after this the right place opens the line compass clock

Do not create a batch file ( path \ batchfile.bat ): c: cd C: \ Ruby200-x64 \ bin \ compass clock Execute "e: / project / html /"

then:
cmd.exe / c "path \ batchfile.bat"

javamail - javax.mail from is not set -


I am trying to send an email using JNDI, but for some strange reason the field has not been set.

context.xml:

  & lt; Resource name = "email / user" description = "support email" auth = "container" type = "javax.mail.Session" username = "User@server.net" password = "pass" mail.debug = "false" Mail.user = "user@server.net" mail.from = "user@server.net" mail.portport protocol = "smtp" mail .host = "mail.server.net" mail.smtp.host = "mail .server.net "mail smtp.auth =" true "mail.smtp.from =" user@server.net "mail.smtp.starttls .enable =" true "mail.smtp.submitter =" user@server.net "/>   

And how am I getting to apply this:

  reference ctx = new InitialContext (); Session user email = (session) ctx.lookup ("java: comp / env / email / user");   

And everything is fine, but when I send this email to some server I get a return message: We can not accept your message - is missing from: (# 5.3.)

Additional question:

How to look good? I tried to do this:

  mail.frame = "company xyz and youtube; user@server.net";   

but it does not work ....

me Found the reason this issue was in the message creation.

me messsage.setFrom ();

code:

  message message = new MimeMessage (mail session); Message.setFrom (); // This message was missing .Set group (subject); Message.setContent (content, "text / html; charset =" + charset); // ... set recipient, ... transport. Send (message);   

Now both of my questions have been answered. "Good looking" is still working.

jquery - Ideas to get the localStorage CRUD for this web app working -


This is where you can see app running. I have been able to sort the information stored in local storage and also display it. (Click on display-data button after entering something in the form).

All code in jqm.js file has been successful with coming in. I like this when I click on an item from the list (see the output data function from the jqm.js file) to add a dynamic page that links to the item that I want to show more information about that particular item Was clicked for.

Please let the people, before coming along with the ways to "rewrite" the whole thing, I need a solution for my current code (if any) I should rewrite the whole argument from scratch Instead of working on your reasoning, many thanks for considering this expansion on being re-displayed. Any idea or suggestion in this area is more than appreciated, thanks in advance from the very first

I have There are some ideas for you.

Before you click on a list view element, you can create a dynamic page:

HTML: < Pre> & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Jqm Complex Demo & lt; / Title & gt; & Lt; Meta name = "viewport" content = "width = device-width; initial-scale = 1.0; maximum-scale = 1.0; minimum-scale = 1.0; user-scalable = a; target-density dpi = device-dpi" / " Gt; & Lt; Link rel = "stylesheet" href = "http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> & Lt; Script src = "http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div data-role = "page" id = "index" & gt; & Lt; Div data-theme = "a" data-roll = "header" & gt; & Lt; H3 & gt; First page & lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div data-role = "content" & gt; & Lt; Ul data-roll = "list view" data-theme = "A" & gt; & Lt; Li Data-id = "1" & gt; & Lt; A & gt; Dynamic Page 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li Data-id = "1" & gt; & Lt; A & gt; Dynamic page 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li Data-id = "1" & gt; & Lt; A & gt; Dynamic page 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Div data-theme = "a" data-role = "footer" data-position = "fixed" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;

JS:

  $ (document) .on ('pagecreate', '#index', function () { $ (Document) .on ('click', '[data-role = "listview"] li', function (event) {if (event.handled! == true) // This event triggered again {Console.log ('click'); event.handled = true; // Click event is controlled, do not bind it next PageEd = parseInt ($ ('body [data-role = "Page"] '). Length (+' 'div data-roles = "page" id = "article' + next page id + '" & gt; & lt; div data- ($ [' data- Roll = '' page ']'). F-back "data-roll =" butt "Data-theme =" b "class =" ui-btn-left "> back  
& lt; / div & gt; & lt; div data-role = "footer" data-theme = "B" data -set position = "fixed" data-id = "footer"> <> h1> footer '); //console.log ($ (' body '). Html ()); // $ ('#text' + nextPageId) .trigger ('pagecreate'); $ .mobile.changePage ('# article' + Next page ed, {Infection: "slide", reverse: false}, true, true); }}); }); Secondly, because you are going to create dynamic content, you have to switch to prepare the document and switch to correct jquery mobile page events.

If you want to find out more about JQuery mobile page events, take a look at this , or search for it .

layout - Joomla 3.0: Can i change the order in which the contact information is displayed -


डिफ़ॉल्ट रूप से यह है:

सड़क और सड़क संख्या

शहर

क्षेत्र

डाक कोड

देश

आदि <

लेकिन मैं इस आदेश को में बदलना चाहूंगा:

सड़क और सड़क का नंबर

डाक कोड < P> देश

देश

आदि

मैं अतिरिक्त एक्सटेंशन इंस्टॉल किए बिना ऐसा करना चाहूंगा ।

आप इसे टेम्पलेट ओवरराइड का उपयोग करके बदल सकते हैं। अधिरोपित काम के लिए देखें।

सवाल में फाइल /components/com_contact/views/contact/tmpl/default_address.php जिसका अर्थ है कि आपको एक फ़ाइल /templates/yourtemplate/html/com_contact/contact/default_address.php जहां आप आवश्यक परिवर्तन करते हैं।

symfony - doctrine extra lazy load doesn't work as expected with count -


मेरे पास एक इकाई दुकान और संबंधित इकाई ShopProduct है निम्नलिखित संबंध:

  / ** * @ORM \ OneToMany (targetEntity = "ShopProduct", मैप किया गया = "shopid", fetch = "EXTRA_LAZY" ) * / निजी $ उत्पादों;   

एक टहनी टेम्पलेट में मैं उत्पादों के count तक पहुँचना चाहता हूं, इसलिए मैं

  {{Entity.getProducts ()। Count}}   

लेकिन जब प्रश्नों की संख्या और सामग्री को देखने के लिए symfony2 प्रोफाइलर का उपयोग करते हुए, मुझे लगता है कि इसके बजाय एक पूर्ण चयन जारी किया गया है COUNT मैं उम्मीद करता हूं (आधार पर)।

प्रत्येक दुकान के परिणामों के लिए पूर्ण चयन जारी करना 250 एमबी + और एक मेमोरी उपयोग में होता है 30+ सेकंड का पेज लोड टाइम, जो अवांछित है।

fetch = "EXTRA_LAZY" को जोड़ने के बाद मैंने सिद्धांत कैश को साफ़ कर दिया है।

Am मैं गलत दृष्टिकोण या डॉक्स की गलतफहमी का उपयोग कर कुछ अनदेखी कर रहा हूं?

[संपादित करें]

  सिद्धांत / एनोटेशन v1.1 सिद्धांत / कैश v1.0 सिद्धांत / संकलन v1 1 सिद्धांत / सामान्य 2.4.0-आरसी 1 सिद्धांत / डेटा-फिक्स्चर देव-मास्टर eef10f6 सिद्धांत / डब्बल 2.3.3 सिद्धांत / सिद्धांत-बंडल v1.2.0-बीटा 1 सिद्धांत / सिद्धांत-जुड़नार-बंडल देव-मास्टर 275540d सिद्धांत / सिद्धांत -मग्रेशन-बंडल देव-मास्टर 99c0192 सिद्धांत / इन्फ्लक्टर v1.0 सिद्धांत / लेक्जर v1.0 सिद्धांत / माइग्रेशन देव-मास्टर ई 1 एफ 6 एफआर सिद्धांत / ORM 2.3.3    

बस एक ही समस्या का सामना करना पड़ा और समाधान बहुत सरल था:

{{value.getAlerts.count ()}} < / Code>

के बजाय

{{value.getAlerts.count}}

ट्वीग सिद्धांत को ओवरराइड करना होगा गिनती () विधि जिसका अर्थ है "अतिरिक्त आलसी लोड" इसका स्वयं के कार्यान्वयन के एक प्रकार के साथ है जो कि सभी इकाइयों को घिनौने रूप से उन पर भरोसा करता है।

यह सभी अपेक्षित SELECT * क्वेरी को COUNT ( *) ...

what encryption is this? 44 chars, ending with = -


Actually I tried a lot of different decryption but I do not know this.

I'm pretty it's an encryption method and not a hash, because the data is to be used.

All of these are 44 characters and end with =

Example:

5yFKMmoA + QNC1ch4islRw2l11jHkUD7xrhN2g4v + People = 6n08mzA1AwzSQHkw9pLVg / AqjDlgz7gUFCDbnSX6irI = Y7ewexuPNgRAf2sz3qQ26by2p1M2fQ8z6NaM5mniWkg =

It looks like base 64-encoded 33-byte strings (44 * 6 = 264/8 = 33).

See:

oauth - Retrieving user's Birthday from google api calls -


समस्या : मैं एपीआई कॉल से उपयोगकर्ता का जन्मदिन प्राप्त करने में कठिनाइयों का सामना कर रहा हूं और मैं ओअथ के लिए नया हूँ ।

चरण के बाद : (Google + के साथ लॉगिन लागू करने के लिए आवश्यक सभी चरणों का पालन करें)
1. ऐप बनाया गया।
2. प्राप्त किया गया ऐप_आईडी और गुप्त_की। < Br> 3. एसडीके का उपयोग नहीं किया, एसपीके के बिना पीएचपी में प्रक्रिया को लागू किया।
4. खातों [डॉट] google [dot] com / o / oauth2 / auth? / कोड>
5. एचटीटीपीएस POST पद्धति से तक पहुँच टोकन के लिए अनुरोधित यूआरएल मापदंडों से कोड का उपयोग करना, कर्ल का उपयोग करना 6. 6. लॉगिन पृष्ठ तक पहुँचते समय उपयोगकर्ता को अनुमति के लिए कहा जाता है ईमेल, प्रोफाइल, डीओबी इत्यादि जैसी जानकारी तक पहुंचने के लिए, लेकिन मैं उस जन्म तिथि को प्राप्त करने का कोई रास्ता खोज नहीं पा रहा हूं। 7. मैंने कोशिश की है www [dot] googleapis [dot] com / प्लस / वी 1 / लोग / उपयोगकर्ता_आईडी? कुंजी = {THE_API_KEY} । अभी भी कोई भाग्य नहीं है


कृपया मार्गदर्शन करें या मुझे सुझाव दें कि DOB कैसे प्राप्त करें मुझे यह भी बताएं कि साझा करने में मुझे कोई अन्य जानकारी नहीं है।

धन्यवाद अग्रिम में।

चीयर्स! फरहान

अच्छा खैर अभ्यर्थी .. यह Google से एक सुरक्षा वस्तु बननी होगी < पी> मुझे पता चला कि मैं विभिन्न परिदृश्यों के साथ यूनिट परीक्षण का एक हिस्सा था और एक साधारण बात पर गुम हो गया था कि Google केवल जानकारी के साथ जवाब देता है अगर उपयोगकर्ता ने अपनी प्रोफ़ाइल सेटिंग में अनुमति दी है। < पी> सभी यदि जन्म वर्ष छिपा हुआ है, तो यह HTTPS पोस्ट विधि के जवाब में 0000 साल का होगा।

अगर मैं प्रदान की गई किसी भी जानकारी में गलत हूं, तो कृपया मुझे ठीक करें। <पी> चीयर्स! फरहान।

java - Trigger javascript from android app -


I'm very new to Android development, one of the app's button sends the user to a webpage, where the user has a specific system Can enter in

The webpage contains a text box for the username and password. Once you click on the login button (in the webpage), it starts a javascript to log into the system. Code is triggered: onclick = "updateAction ('TourAccLogin'); document.main_form.submit ();

Webpage form to login: < P> webpage form to login

My question is: < I have a username and password in the app, I want to know that I can manipulate this form anyhow, can I sign in automatically without user intervention? I mean, I will fill in the username and password, I On the login button, we will immediately be directed to the system without entering the username and password.

The technique has worked for me. In my case, I am loading the named field in the MLEIDIDID with a string value stored in some data, then fires its changing event, which was not itself. Javascript command slots in a single injection Track. I'm sure it will be a job for you.

I also aped a single quotes to prevent a javascript error. You may need to avoid any other special characters, including semicolons, in my case it was not necessary because the data had already been purified.

  // element copy mWebView.loadUrl ("javascript: (function () {" + "document.getElementById ('+ MlementId +') .value = '' + someData ("", "", "" "+" '; "+" Document.getElementById (' + + + + + + + '') .change (); "+"}) () ");    

objective c - NSOutlineView: How to have different custom color for item with and without child? -


I have a custom sub-class of NSOutlineView that uses Cellfixel as a cell. Some things with children (which represents a group of children)

I have to keep a custom color for the child without the child and another custom color for the items without hair. I tried to convert it to IB, but color changes only for hair items and in the code I can also set a custom color, but can anyone help me only for hair items?

After a thorough research, it seems that the only way to do this is to override attract Do: Methodology NSOutlineView subclass

linux - What are $0 and $1 in an awk script? -


:

  1 tolower ($ 1) ~ / mary / {प्रिंट "सीआई रिकॉर्ड: "$ 0; } 2 $ 0! ~ / मेरी / {प्रिंट "मैरी नहीं:" $ 0; } 3 $ 1 == "मैरी" {प्रिंट "मैरी रिकॉर्ड:" $ 0; }   

क्यों 1 और 3 तुलना $ 1 और 2 का उपयोग करके < कोड> $ 0 ?

वास्तव में उदाहरण # 2 का उपयोग कर रहा है इस वाक्यविन्यास की वजह से एक regex

  / regex /   

जिसका अर्थ है कि यदि शाब्दिक पाठ मेरी नहीं है पूरी रेखा में कहीं भी पाया ( $ 0 ) फिर awk कोड निष्पादित करें।

जबकि $ 1 == "मैरी" शाब्दिक पाठ मैरी और फ़ील्ड # 1 ( $ 1 )।

अंत में टोलवर ($ 1) ~ / mary / फिर से अनवर-केस का उपयोग कर रहा है फ़ील्ड # 1 पर रेगेक्स मैच और इसका मतलब यह है कि अगर $ 1 में पाठ mary (अनदेखा-केस) है, तो बाकी का एजेक कोड निष्पादित करें। < / html>

MYSQL split out records except latest from multiple duplicates -


I am looking for hours to find it and when there are so many changes I can not look very close to my Loop on the specific requirement .... Every time I think I have found it, it goes away from me :)

So it is here;

I have imported a bunch of records in one table with one of the underlying rows, but with some duplicate data in some columns. I want to split the records into two tables - a separate table that has the latest timestamp within the 'code' group, and a table with the remaining record / P >

[Edit - Sensest forgiveness, I have to make a re-phrase because I do not think that I had clearly written clearly for the first time - in fact it was very wrong to me ... sorry!]

Cave with me There are several columns with unique ROWS - (i.e. duplicate data in each column, but the combination of all the columns in a specific line is unique - except explicitly leaving the primary key)

What do I need Row is the latest timestamp for code inside code . In the example below I have seen that I have excluded other columns in the form of these three keys;

  Table # 1 Code Area_ID Timestamp 1 2 2010-02-31 00:00:00 2 2 2012-01-31 00:00:00 2 2 2011-02 -31 00:00 : 00 1 5 2010-02-31 00:00:00 2 5 2010-02-31 00:00:00 1 2 2011-01-31 00:00:00 1 5 2012-01-31 00:00:00   

So I am trying to structure this sentence;

" 1 & amp; Area_id 2 for the combination of code, the latest timestamp 2011-01-31 00:00:00" - Return that line back.

Repeat for each combination of code and Area_ID.

Such;

  RESULT code area_im timestamp 1 2 2011-01-31 00:00:00 2 2 2012-01-31 00:00:00 1 5 2012-01-31 00:00:00 2 5 2010-02-31 00:00:00   

As I said, there are some other columns that need to be filled with the data when I split the rows, but I It seems that I can worry about it later - the first step is not to receive data on a result set without mysql / workbench time on me!

JS

and this is for table 2

  Include in Table 2 Select Table 1 to <(Code, Timestamp) (Selection Code, Maximum (Timestamp) from Table 1 Group by Code)   

And then it To delete a record from Table 1: Delete the table from

  where 1 (code, timestamp) is not (Select * from (select the code, maximum (timestamp) from the code by yourTableable Group ) S)   

Kindly See Bella (I have already turned 28 on February 31, April 31 to the 30th, I think it was a typo).

Edit

Since these queries are too slow to execute, so you can try the JOIN version:

  Select t1 in table 2 * Table 1 T1 Join the left (Selection Code, Max (Timestamp) Code by Table 1 Group from Max_Tamestamp) T2OnT1Sidod = T2Sidod and T1 TeamStamp = T.max_timestamp. Where T2 COD is the placid; Table 1 T1 Remove from the left pair (Selection code, Maximum (Timestamp) Code by Table 1 Group with maximum_temstamp) T2 on T1 Sidode = T2 Sidode and T1 TMESTamp = T. MX_Timstamp WHERE T2 COD Crack;   

Please see Bela.

In addition, you can try to add one of the following indexes:

  CREATE INDEX idx1 ON Table 1 (code) Create Index IDX2 Table 1 (Timestamp) Create Index IDX 3 Table 1 (Code, Timestamp)    

html - Make a div a appear and stay after parent div has been clicked on using CSS -


मैं एक div (वर्तमान में डिस्प्ले: छुपा; ) को माता-पिता div पर क्लिक किया गया है, और सीएसएस का उपयोग करके वहां रहें।

मैंने इसे वर्तमान में इसे "कोड": सक्रिय के साथ "पर क्लिक किया" दिखाई दिया है, लेकिन जैसे ही मैं माउस के बटन Div गायब हो जाता है

मैं इसे पर क्लिक किए जाने के बाद कैसे जगह बना सकता हूँ?

मैंने : का दौरा किया और : फोकस कोई भाग्य के साथ, कोई सुझाव नहीं?

मैं इस पर नया हूँ इसलिए मुझे यकीन है कि मैं कहीं गलती कर रहा हूं। यह भी बेहतर होगा यदि डिवीज़ दूर हो जाए तो माता-पिता की एक बार फिर क्लिक की जाएगी।

मैं वास्तव में आपकी मदद की सराहना करता हूं। धन्यवाद।

  & lt; html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; शीर्ष & gt; & Lt; शैली प्रकार = "टेक्स्ट / सीएसएस" & gt; .container .l-col, .r-col {display: none; }। कंटेनर {कर्सर: पॉइंटर; }। कंटेनर: सक्रिय .l-col {display: block; स्पष्ट: बाएं; बाईंओर तैरना; चौड़ाई: 50%; ऊंचाई: 50%; }। कंटेनर: सक्रिय। R-col {display: block; सही नाव; चौड़ाई: 50%; ऊंचाई: 50%; } & Lt; / style & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; div id = "पोर्टफोलियो" वर्ग = "कंटेनर" & gt; & Lt; h2 & gt; मूल तत्व & lt; / h2 & gt; & Lt; div class = "l-col" & gt; & Lt; h3 & gt; वाम कर्नल & lt; / h3 & gt; & Lt; p & gt; पिल्डेस्की निवास स्थान पर स्थित मोरबी ट्रिस्टीक के बारे में पता लगाया गया है और इसके बारे में अधिक जानकारी दी गई है। यह कैसे काम करता है, अपने जीवन के बारे में सोचता है एक बार जब आप एक ही समय के लिए स्वतंत्र हैं एनीन अल्टिकिज़ मी वाइटेएस्ट। मॉरीस प्लसटर एलिफेंडर लियो। & Lt; / p & gt; & Lt; / div & gt; & Lt; div class = "r-col" & gt; & Lt; h3 & gt; दाएं कर्नल & lt; / h3 & gt; & Lt; p & gt; पिल्डेस्की निवास स्थान पर स्थित मोरबी ट्रिस्टीक के बारे में पता लगाया गया है और इसके बारे में अधिक जानकारी दी गई है। यह कैसे काम करता है, अपने जीवन के बारे में सोचता है एक बार जब आप एक ही समय के लिए स्वतंत्र हैं एनीन अल्टिकिज़ मी वाइटेएस्ट। मॉरीस प्लसटर एलिफेंडर लियो। & Lt; / p & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; / body & gt; & Lt; / html & gt;    

आप का उपयोग करके बहुत अधिक समय और प्रयास बचा सकते हैं -

 <कोड> & lt; स्क्रिप्ट & gt; एन्कोडीशन ({ऊँचाई स्टाइल: "सामग्री", खुलने योग्य: सत्य, सक्रिय: गलत, एनीमेट: {अवधि: 1000, आसान: 'आसानी ऑउटबॉइस'}}} $ (फ़ंक्शन ()। );}) & Lt; / script & gt;   

ध्यान दें कि आप इस प्लगइन की किसी भी तरह से शैली कर सकते हैं,

  .accordion {/ * कुछ शैली * /} .ui-accordion-content { / * कुछ शैली * /} .accordion h6 {/ * कुछ शैली * /}   

यह एक ऐसा दिखाता है कि मैंने एॉर्डियन विजेट का दुरुपयोग कैसे किया है।

javascript - Keep Text Vertically Centered on Canvas -


The problem I have is that a user keeps the written text centered inside the canvas element. I have created a test environment to try and solve this issue, which I have provided with a Bela in this post. Here is my code:

HTML:

  Enter your text: & lt; Br / & gt; & Lt; Textarea id = "inputtextuser" onkeyup = "inputtextgo ()" name = "text" & gt; Enter your & lt; / Textarea & gt; enter the; & Lt; Br / & gt; TextBisline: & lt; Select ID = "InputTextBaseline" onchange = "InputTexto ()"; & Gt; & Lt; Option value = "alphabetical" & gt; Alphabet & lt; / Options & gt; & Lt; Option value = "top" & gt; Top & lt; / Option & gt; & Lt; Option value = "bottom" & gt; Bottom & lt; / Options & gt; & Lt; Option value = "medium" & gt; Medium & lt; / Options & gt; & Lt; Option value = "hanging" & gt; Hangs & lt; / Options & gt; & Lt; / Select & gt; & Lt; Br / & gt; & Lt; Canvas ID = "canvas 1" width = "300px" height = "200px" & gt; Your browser does not support HTML5 Canvas tags. & Lt; / Canvas & gt; & Lt; Br / & gt; & Lt; Div id = "textheightentered" & gt; & Lt; / Div & gt;   

CSS:

  canvas {boundary: solid 1px black; }   

javascript / jquery:

  // declare canvas var canvas1 = document.getElementById ('canvas1'); Context1 = canvas1.getContext ('2D'); // function running to update canvas inputtextgo (); Recovery of text entered by Function inputtextgo () {// user var inputtext = document.getElementById ("inputtextuser"). Value; // user var texthit = call function to calculate the height on text entered by fonttext (inputtext); // user var baseline = reclaim the baseline selected by getElementById ("InputTextLineLine"). value; // y y = 100 + textheight / 2 to focus the text based on the height of the text to calculate the new Y; // Updating canvas for new text entered by User Contact 1. Clearrack (0, 0, 300, 200); Context1.font = "36px Arial"; Context1.textBaseline = Baseline; Context1.fillText (InputText, 0, Y); // Drawing a line between the canvas for reference reference 1 .strokeStyle = "red"; Context1.moveTo (5,100); Context1.lineTo (290,100); Context1.stroke (); $ ("# Textheightentered") Text ("text height:" + texthit); } Function fontheight (text) {var canvas = document.createElement ("canvas"); Canvas.wind = 1000; Canvas.height = 200; Var ctx = canvas.getContext ("2D"); Function RouteTextHight (left, top, width, height, text) {// Draw text in the field ctx.save (); Ctx.clearRect (0,0, canvas.Wind, canvas.height); Ctx.baseline = "top"; Ctx.fillText (text, 0, 35); // It seems like long text ... is not it? Ctx.restore (); Get the pixel data from // canvas-work data = ctx.getImageData (left, top, width, height). Data, first = false, final = false, r = height, c = 0; // Find the last line with a non-white pixel, while (! Last & amp; R); (C = 0; c & lt; width; c ++) {if (data [r * width * 4 + c * 4 + 3]) {final = r; break; }}} // Find the first row with non-white pixels while (r) {r--; For {C = 0; C & lt; width; c ++} {if (data [r * width * 4 + c * 4 + 3]) {first = r; break; }} // If we got it then the height will be returned if (first! = R) returning finally - first; } // We spoiled something ... what do you expect from the free code? Return 0; } Ctx.font = "36px aerial"; Var height = Volume (0, 0, canvas. Width, canvas., Text, text); // string returns return the height of the height; } // and $ (function () {}); JSFiddle:  

The issue I am coming to is that if the user enters a lower case "Y", for example the change in the height of the text changes and the text remains in the center of the canvas Due to the fact that the basic improvements made in y variables will need to be separated on the basis of the text recorded (short and uppercase letters) depending on the improvement in the y variables in the text below the baseline. Leave it Do not be.

This is where I get my problems because I want to keep the text centered around the canvas element every time. The only thing I can think of is to calculate the non-empty pixels beneath the TextBaseline reference point and then to use the difference from the baseline to the end of the text to offset the text to focus on the canvas I'm not sure How do you write this script or if it is possible, but this is the best way with which I came.

If someone has any ideas or guidance, then developing this approach to solve this issue will be highly appreciated as it has got stumped.

You can take a look at this. A text wrapper is used.

Performance testing tornado application -


What are the best tools for testing the performance of the tornado application? I know that Apache is a way to perform benchmark performance tests. Can someone recommend me a tool, which is easy to use ...

I have run the test With this Python framework now gives slightly more control than now, I advise to do this.

There are other popular people (as you have said) and

c# - Modelling a business hierarchy -


I have a dashboard application where the user can navigate up and down through the 'Business Unit' hierarchy and its Can see data for unit

The hierarchy is as follows:

  Company | | Office Department Group | | Department | Stream | Employee   

How can I model this object using the object I think is that I will have an IETIT interface like:

  Public Interface IERTIT {Int entity {get} Set; } String EntityCode {get; Set; } String EntityName {get; Set; } List & lt; IEntity & gt; Children {receive; Set; } List & lt; IEntity & gt; Parents {receive; Set; }}   

How should I model my concrete sections to implement this structure?

My concern here would be to remove the benefits of referring to a solid type list in the context of IRETTE will be given. If a department can only be in the sections, then I will have a property that is a IList & lt; Department & gt; (or IList & lt; idPember & gt; if you are Commitment-Shy) IList & lt; IEntity & gt; ) that are not worth the flexibility of the required flexibility.

php - Passing variables to a has_one relationship in PhpActiveRecord -


I am using phpactiverecord () in a project.

I have definded the following relationships, is there any way to pass a variable, so I can change language_id on the fly?

  is stable $ is_on = array (array ('language', 'class_name' = & gt; pages_lang ',' conditions' => array ('language_id = 1'))) ;   

I looked at the docs and it appears that you can do this:

  is static $ is_on = array (array ('language', ' Class_name '= & gt;' pages_lang ',' conditions' = & gt; array ('language_id =?', '1')));   

but going through a variable:

  Fixed $ has_one = array (array ('language', 'class_name' => 'Pages_lang ',' Conditions' = & gt; array ('language_id =?', $ Language_id)));   

Text "itemprop =" text ">

Static Variables are understood only in the context of objects that an object of that kind has actually been created (instantiated) before they come into existence

I am not sure That's what you are trying to achieve here, but you probably want to change the variables at some point in the control flow of your program. Make a call within a client that should make a call and set the value of that stable variable (recommended, see the code below for example) or set it explicitly with your main code (not recommended , Your variable is also required for public )

  square fu {static $ has_one = 'initial value'; public stable work sethos ($ value) { Self :: $ has_one = $ value;}} / main code: foo :: set ons ('new value');   

For simplicity I have used a string variable here, but it works only with arrays.

compilation - Compiling C++, organising include files -


I am trying to modify and compile uvccapture on Raspberry Pi. I got the source (these are just some files). (I think) only external files are needed, they are jpeglib that I downloaded from.

When compiling, where do I put jpeglib source files? The following line is in UVCCapture:

  #include & lt; Jpeglib.h & gt;   

Does this mean that I should have jpeglib source files in the same directory as the UPCSE source source? It seems messy. How can I set compiler (modify makefile?), And that's why I include file lines to change uvccapture?

And one does not need where I should keep jpeglib files, side questions, how come it only includes .h file and Not a C file? (I'm quite new to C / C ++)

Here's the makefile:

  cc = gcc cpp = g ++ APP_BINARY = uVccapture VERSION = 0.4 PREFIX = / Usr / uvccapture clean: local / bin alert = -Wall CFLAGS = -std = gnu99 -O2 -DLINUX -DVERSION = \ "$ (version) \" $ (warning) CPPFLAGS = $ (CFLAGS) = uvccapture.o v4l2uvc O All items: @ echo "cleaning directory." Rm -f * A * O $ (APP_BINARY) core * ~ logon install errorlog installed: $ (APP_BINARY) $ (prefix) $ application: uvccapture: $ (items) $ (cc) $ (objects) $ (XPM_LIB) $   P> The source file ( uvccapture.c ) does not care where the header file ( jpeglib.h ) - should not be at least this. The compiler should be told where the header files will be; Traditionally, the header files go to some directories such as  inc_files / , and compile a command like  
  GCC-Blah-Blah-Blah-Ens_file-c- O uvccapture.o uvccapture.c   

If you use make, then execute a command like that. Then either edit the makefile, or put the header file in the current directory.

Wisely use #include contains the C / C ++ source files and header files, header files are foo.c There should be some lines like:

  #include & lt; Bars & gt; There are some lines in #include "baz.h"   

and baz.h such as:

  #include & LT; Vector & gt; #include "qux.h"   

You can almost never see #include foo.c , because it's almost never a good idea.

javascript - Why is this JS not being properly executed in IE? -


This works in the all browser, but IE has censored the code that I < Em> address can read properly, so you are not overwhelmed Why does IE say that my function is not present?

Error:

  SCRIPT5009: 'switchstyle' undefined test.php, line 180 characters 21   

HTML:

  025: & lt; SCRIPT TYPE = "text / JavaScript" SRC = "/ _JS / StyleSwitch 2.js" & gt; & Lt ;! - Style script switching - & gt; & Lt; / SCRIPT & gt; ... 180: & lt; SELECT ONCHANGE = "return switchstyle (this);" & Gt; 181: & lt; OPTION VALUE = "/_ssss / default.css" & gt; Choose a style! & Lt; / OPTION & gt; 182: & lt; OPTGROUP label = "skin group 1" & gt; 183: & lt; OPTION VALUE = "/_css / alt1-1.css" & gt; Alt 1.1 & lt; / OPTION & gt; 184: option option = "/_css / alt1-2.css" & gt; Alt 1.2 & lt; / OPTION & gt; 185: Option Option = "/_ssss/ alt1-3.css" & gt; Alt 1.3 & lt; / OPTION & gt; 186: & lt; / OPTGROUP & gt; 187: & lt; OPTGROUP label = "skin group 1" & gt; 188: & lt; OPTION VALUE = "/_css / alt2-1.css" & gt; Alt 2.1 & lt; / OPTION & gt; 18 9: & lt; OPTION VALUE = "/_css / alt2-2.css" & gt; Alt 2.2 & lt; / OPTION & gt; 190: & lt; / OPTGROUP & gt; 191: & lt; / SELECT & gt;   

JS:

  var sheet element = document.getElementById ("_ switchSheet"); Var backupSheetElement = document.getElementById ("_ switchSheetBackup"); SheetElement.disabled = false; If (backupSheetElement) backupSheetElement.disabled = false; Else // Use the Warning var cookie = true; Const COOKIE_NAME = "cookieame"; Function Switch Style (Selection Element) {If (Sheet Element == blank & amp; amp; amp; amp; & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; _ Switchsheet ")) == faucet // Failure switch style (selection element value); } Function switch: stylo (new sheet) {sheetElement.href = (new sheet == backupSheetElement.href)? Tap: new sheet; Setcookie (newSheet); } Set functionsUse cookies (shouldcookies) {usecookies = keysecurity; } Function set cookie {cookie} {// works} function getCookie () {// works} function setSatilFrenchKookie () {var cookie = getCookie (); If (cookie.length & gt; 0) switch style (cookie); Else // fail}    

Because this line is an error in IE, restraining the rest By running code.

  const COOKIE_NAME = "cookiename"; Change   

const to var

or:

  Try {Const. COOKIE_NAME = "Cucknim"); } Hold (e) {var COOKIE_NAME = "cookieame"; }    

php - Mapping a static value to a static value -


I am trying to map some values ​​with the values ​​the user has entered. Here comes from the real user and fed from the $ target table

  if (mysqli_connect_errno ()) {echo "failed to join MySQL:" mysqli_connect_error (); } And {$ real; $ Comment; $ Thief; $ Currency ($ _ POST ['value'] as $ country = & gt; $ value1) {foreach ($ value1 to $ target = & gt; $ value2) {// value = & gt; ["Matrix"] Forex Currency ($ value2 $ matrix => $ value3) {// value = & gt; String $ country "$ Target" "". $ Matrix "" $ Value3 "


" If ($ matrix == "actual") {$ actual = $ value3; } And if ($ matrix == "comment") {$ comment = $ value3; }} $ Sql ​​= "Select target from target where ini_id = '$ ini' and country_id = '$ country' and metric_id = '$ goal'"; $ Result = mysql_query ($ SQL); $ Target = mysqli_fetch_array ($ results); Insert ($ actual, $ target ['target'], $ country. $ $ Target $, $ comment, $ conn.);

WARNING: mysqli_fetch_array () parameter 1 is expected to be mysqli_result, given in Boolean C: \ xampp \ htdocs \ xampp \ testing \ sq1.php on line 107

I see that instead of mysql_query mysqli_query are using P>

(and thus mysqli_fetch_array does not really know how to interpret that argument)

How to generate multi workers and bind them to non-web Java applications on Heroku -


I tried to generate two workers on the harrowing server

But on the basis of this example, At the same time an employee has run.

Is it possible to run 2 different jobs to run 2 workers by using workers: heroku ps: scale worker = 2 by using workers already? But when I do this, it only affects the worker process class and I have two worker process classes running at the same time.

Yes, you can have as many worker procedures as you want them having different names in your profile In the article written by you, a single worker is called only worker , but your profile will be in this way with two different workers like updater and Mailer says>: Web: Java Word Web-App. $ Port Updater: Shaw Karta / Target / Bin / Updater Mailer: Shi Employee / Target / Bin / Mailer

If you are using Appembler-Maven-plugin shown in the article If so, you'll see another & lt; Program & gt; ... & lt; / Program & gt; Must have to add. ; Elements for each of your workers, hence initial start scripts are generated.

c# - Get to get/set Input control values created in code-behind -


मेरे पास कई इनपुट (टेक्स्टबॉक्स) नियंत्रण होते हैं जो codebehind में एक गतिशील रेडियोबूटटन लिस्ट नियंत्रण के हिस्से के रूप में बनाए जाते हैं (ताकि एक टेक्स्टबॉक्स रेडियोबूटटन के बगल में है): <प्री> रेडियोबटन लिस्ट रेडियोओपशन = नया रेडियोबटन लिस्ट (); Radiobuttonlist.Items.Add (नई सूचीइटम (डीटी 1। आरओएस [आई] [9] .ओस्ट्रिंग () + "इनपुट आईडी = \" "+ + +" \ "रनैट = \" सर्वर \ "टाइप = \" पाठ \ "मूल्य = \" पाठ दर्ज करें \ "/ & gt;")

मेरा सवाल है, मैं इनपुट पाठ को कैसे निर्धारित कर सकता हूं ताकि उसे मूल्य निर्धारित किया जा सके या पाने?

एक लूप के हिस्से के रूप में कुल मिलाकर लगभग 10 विभिन्न इनपुट नियंत्रण होते हैं।

किसी भी विचार को काफी सराहना की जाएगी !!!!

आइटमप्रॉप = "पाठ">

मैं क्या करता हूं, FindControl विधि का उपयोग कर रहा है। आपकी आईडी क्या है उसके आधार पर, आप उनसे पुनरावृति कर सकते हैं और नियंत्रण पा सकते हैं - और फिर उसे विशेष नियंत्रण में डालें

  पाठ बॉक्स पाठ बॉक्स = (पाठ बॉक्स) पृष्ठ। फ़ंड नियंत्रण (आईडी);   

तब आप सेट कर सकते हैं और उस पर पा सकते हैं:

  textBox.text = "text"; स्ट्रिंग टेक्स्ट = टेक्स्टबॉक्स। टेक्स्ट;   

संपादित करें: आपको रनैट = "सर्वर" टैग को भी जोड़ना पड़ सकता है इसे सर्वर साइड से एक्सेस करने के लिए डायनामिक रूप से बनाया गया टेक्स्ट बॉक्स।

security - Deny file access but server properly in IIS -


I have a JS file that is included in the master page

When I use the user in the browser address bar I type the link, I want to deny access to file access.

I have tried the URL filtering IIS, such as:

  & lt; Security & gt; & Lt; RequestFiltering & gt; & Lt; DenyUrlSequences & gt; & Lt; Add Sequence = "Scripts / Foo / Bar. Min. JS" /> & Lt; / DenyUrlSequences & gt; & Lt; / RequestFiltering & gt; & Lt; / Safety & gt;   

This works, when I type 'localhost': //blah/Scripts/Foo/bar.min.js' is blocked by me.

But it is important to delete the page because it can not render JS file.

Do anyone have an alternative solution? thank you in advanced!

100% is not fixed but I think there is no way to do this. When the browser provides your page, it actually sends the same request to the server, when you manually type in the JS file in the browser.

IIS does not

  1. Add any type of ID to your JS file such as this scripts / Foo / bar.min.js? ID = E3CF305B-4444-E011-8FD2-1CC1DEE89A7F
  2. ID time is limited and it has been made 20 seconds or later (enough time for browser)
  3. Creating a custom handler Which will parse the ID and decide whether the server should return the request

    so when any type of script / foo / bar min.js handler will reject the request, Will also end when requested ID is used.

    However It probably will be difficult to maintain and will be intense for your server.

    If you want to hide your JS file, why not? Why not fuse it.

javascript - How should I represent data for effective searching and comparing strings -


I have two arrays with length 300. They look like this (JSON representation):

  [["word1", 0.000199], ["word 2", 0.00012], ... ["word 15", 0.00012] ], ... [["Untitled 1", 0.0032199], ["other word 2", 0.032302], ... ["anotherword15", 0.0320102]]]   

and my It has a brute force algorithm:

 for  (var i = 0; i <300+ i ++) {for (var j = 0; j & lt; 15; j + +) {For var ii = i + 1; ii <300; ii ++) {for (var jj = 0; jj & lt; 15; jj ++) {for (var jjj = 0; jjj & Lt; 15; jjj ++) {if (new_keywords [i] [j] [0] === new_keyword [ii] [jj] [0] and amp; new_keywords [ii] [jj] [ 0] === state_keyword [i] [jejezi] [0]) {console.log (0); }}}}}}   

I need to find the same word in those arrays and if the words are the same, then I use the values ​​and divide the sum by 3 And change that value to the state_keywords array. So much for every word, the value of my values ​​will be once in the array.

Now ... my attitude is very bad because I now have about 300 million iterations and it's crazy. I need some better implementation of my array in Javascript

Edit:

With the example it is.

/ P>

EDIT2:

I'm sorry if I'm not enough. So what am I doing:

  • I have the array state_keywords . The index is 0 to 299 and they can be one themes ...
  • Each subject can be represented by 15 words and every time the new_keywords Array comes, they can be different.
  • When new_keywords array arrives, I need to check every word in that array if it is in the state_keywords array on the same topic index.
  • If it is: Add the probabilities up and divide by 2.
  • If it is not: add a new word in the state_keyword array but if they are more than 15 words for a topic (which are now), then I need to store just sorted from the first 15 possibilities.

    And I need to effectively do this because I need to do it every second, so it should be fast.

    EDIT3:

    Now I use this code:

      var i, j, jj, l ; For {i = 0; i <300; i ++} {for (j = 0; j & lt; 15; j ++) {l = new_keywords [i]. Length; (Jj = 0; jj & lt; l; jj ++) {if (state_keyword [i] [j] [0] === new_keyword [i] [jj] [0]) {state_keywords [i] [j ] [1] = (state_keyword [i] [j] [1] + new_keyword [i] [jj] [1]) / 2; }}}}   

    Which is faster than ever.

    Why do not you consider those arrays in keys with objects in the objects? Then you can see the words directly and get the value?

      var wordlists = [{word1 ": 0.000199," word2 ": 0.000102, ..." word15 ": 0.00012}, ... {" anotherword1 ": 0.0032199," anotherword2 " : 0.032302, ... "anotherword15": 0.0320102}]   

    and then

      word list [0] ["word2"] //0.000102    

ruby - Why this weird value is assigned? -


  वर्ग MyClass def fun a = 2 b = 5 उपज (a, b) end def self.fun2 स्वतः कहते हैं अंत का अंत एम = 1 एन = 2 मेरा = MyClass.new mine.fun {| एम | मैं "जानबूझकर उपज के मानकों की संख्या से मेल नहीं खाता हूं, और आउटपुट है    

> test.rb: 16: चेतावनी: test.rb से एक ब्लॉक पैरामीटर (2 से 1) के लिए एकाधिक मान: 5 मी = 25 n = 2

यह 25 कहां है से आते हैं?

मुझे आपको 1.8.x में संदेह है।

उस स्थिति में, m होगा [a, b] । जो [2, 5] के बराबर है।

  [2, 5] .to_s # = & gt; "25" "मी = # {[2, 5]} n = # {2}" # = & gt; "मी = 25 n = 2"    

xaml - How can I fade in and out three times, in WPF? -


I want to fade out WPF three times and here is my source:

  & Lt; Image height = "274" horizontal alignment = "left" margin = "307,6,0,0" name = "image1" stretch = "fill" vertical alignment = "top" width = "469" source = "/ MacTest; component / IPhone_20.jpg "& gt; & Lt; Image.Triggers & gt; & Lt; Event Trigger Routing Avent = "Window Loaded" & gt; & Lt; BeginStoryboard & gt; & Lt; Storyboard & gt; & Lt; Double animation storyboard TargetName = "image2" storyboard. TargetProperty = "Opacity" from = "0" = "1" = "0: 0: 1" Beginners = "0: 0: 0" AutoRowers = "True" RepeatBehavior = "Forever" /> & Lt; Double animation storyboard TargetName = "image3" storyboard. TargetProperty = "Opacity" = "0" from "1" = "0" period = "0: 0: 1" beginning = "0: 0: 0" AutoRover = "true" RepeatBehavior = "forever" /> & Lt; / Storyboard & gt; & Lt; / BeginStoryboard & gt; & Lt; / EventTrigger & gt; & Lt; /Image.Triggers> & Lt; / Image & gt; & Lt; Image height = "274" horizontal alignment = "left" margin = "307,6,0,0" name = "image2" section = "fill" vertical alignment = "top" width = "463" source = "/ create" component / IPhone_3.jpg "/> & Lt; Image height = "274" horizontal alignment = "left" margin = "307,6,0,0" name = "picture3" section = "fill" vertical alignment = "top" width = "463" source = "/ createOutest; Component / i ?? ¼ì ?? ± 8-02.jpg "/>   

I want to paint three pictures out and how can I do this?

  & lt; Double animation storyboard Target name = "image2" from the storyboard TargetProperty = "Opacity" from = "0" = "1" period = "0: 0: 1" Beginners = "0: 0: 0" AutoRowers = "True" - & gt; RepeatBehavior = "3x" /> & Lt; -    

MySQL multi table user_id does not exist query -


मेरे पास ऐसे 3 टेबल हैं:

  उपयोगकर्ता तालिका user_id first_name ईमेल 1 बॉब बॉब @ Bob.com 2 जेन jane@jane.com 3 Fred fred@fred.com लिस्टिंग लिस्टिंग_id user_id स्थिति 1 1 2 1 1 3 2 1 4 3 1 उपयोगकर्ता बिलिंग billing_id user_id स्थिति 1 1 2 2 1   

उपयोगकर्ता तालिका में सभी उपयोगकर्ता जानकारी है लिस्टिंग तालिका में एक नीलामी लिस्टिंग के बारे में जानकारी है। इस तालिका का स्थिति कॉलम यह निर्धारित करना है कि क्या लिस्टिंग सक्रिय है या समाप्त हो गई है। बिलिंग तालिका में उपयोगकर्ताओं के बिलिंग विवरण से संबंधित जानकारी है।

सभी तालिकाओं उपयोगकर्ता_id के आधार पर संबंधित हैं मैं क्या निकालना चाहूंगा वह सभी उपयोगकर्ता जानकारी है जहां उपयोगकर्ता की एक सक्रिय सूची है लेकिन उसने अपने बिलिंग विवरण दर्ज नहीं किए हैं। इसलिए उपरोक्त तालिका उदाहरण का वांछित परिणाम होगा

  user_id first_name ईमेल 3 Fred fred@fred.com   

के रूप में फ़्रेड वर्तमान में एक सक्रिय लिस्टिंग है लेकिन

बहुत धन्यवाद।

<पूर्व> चुनें यू। * यूजर यू इननर में शामिल हों लिस्टिंग का उपयोग करना (यूज़र_आईडी) बाएं ओवर यूजर यूजर_बिलिंग बी यूएसआईएडी (यूज़र_आईडी) WHERE b.user_id IS नल है;

Static Utility class with Context/Activity - Android -


During the development of the Android app, I have come to collect utility-type methods which I have put in a static.

However, now I have some methods that require references to the activity and that which is required is the activity itself. Let me give examples of some of them:

  • getDeviceNaturalOrientation () - Uses getWindow () of an activity. GetWindowManager (). GetDefaultDisplay () orientation to display the rotation, width and height to determine the display's natural.
  • getDeviceOrientation () - To get the current orientation but to create the current orientation
  • createFile () - Uses the reference to reach and create and show some resources (wire) SOME LOST

    Now, I have big questions about this bogus class:

    1. So far, every function takes a reference parameter, whatever I I am on activity, but is there a stable context or activity variable in the UTILS class Nanny and have to set it at the beginning of every activity (like on crick)? This variable will be used in the context of any context or activity.
    2. Assume above that it is not recommended, whether it is ok to pass an activity parameter in a method or just as an activity reference? The methods I use for the above device orientation tasks are not specific to the activity objects, not the reference, so I pass pass as an activity or pass in the form of the event and put it into action (after Looks like a terrible idea in). Apart from this, I am very open to the idea that the Util Class is not the way to go for these methods, which requires reference / activity, so I welcome those options. I'll still be able to stop copies of these methods in every activity that class uses them.

      1) A constant link for reference can cause memory leakage. This means that even a reference to the activity will be placed in the static variable even after being destroyed, so all memories of the activity and all its thoughts will be valid and will not be cleared by GC. You can do this, but whenever you are done, be careful to take out the variable. Its better to avoid it properly.

      2) The activity is slightly weird for passing the activity, but there is no technical reason for this. At that time we are debating the code cleaning / maintenance. And there are times when non-clean solutions are very easy. Of course, in the above cases, I pass the function rather than passing the orientation / display / resource items in full context or making special accessories.

c - Linux: Can a signal handler excution be preempted? -


I came across the following signal handler code which stores the wrong variable so that it does not affect the wrong handle of the main thread.

  Invalid myhandler (int signo) {int esaved; Esaved = errno; Write (STDOUT_FILENO, "got a hint \ n", 13); Errno = esaved; }   

But does it really work? What happens if after writing another thread check is check for shared errno varible? And before restoring the error? Can the thread be wrong wrong due to race conditions?

Or a signal handler performs atomic with regard to a thread / process, so that after the signal handler is executed, the kernel will be used until the thread handler is finished Schedule back?

After being placed in other words - execute a signal handler without interruption:

  - 1) Scheduler (process / thread), or - 2) Other signals, or - 3) hardware interrupt handlers?    

variable errno is thread-specific ?? ?? Or, more accurately, in a threaded environment, is a thread-local or per-thread value? So what is done to this errno in this thread will not affect errno in other threads.

The purpose of saving and restoring the code is to hide any error set by write () system call myhandler () . But if write () fails, then it can set some new value to errno ???? It will not be zero, but all this can say about you ??? But the call you are asking about is calling the call after writing write () to start the value again before to write , So that the fact that it is written is 'invisible' in this sense that it does not affect errno for this thread.

The signal indicator function can be interrupted by the signals which are not blocked by signal masks. The sign is that it is reacting. It can also be rescheduled. There may be hardware interrupts, but code will be pressed in view of these effects.


On Linux, you may get /usr/include/bits/errno.h defining the macro error (more than More #ifdef wrapped in code shown here):

  extern int * __ errno_location (zero) __THROW __attribute__ ((__const__)); # If! Defined _LIBC || When using defined _LIBC_REENTRANT / * thread, the error is a per-thread value * / # define the error (* __ error number_position ()) #andif    

sqlcommand - asp.net sql for "top 10 ordered in ascending order by the items within the top 10" -


I have to use a database to use ASP.NET and pick up the top 10 items and mount upwards In order to sort them 10. I have used combinations from the following and they have not got to work:

Top 10 [rows] LIMIT (not supported) order [rows] ASC < / P>

You can do something like this (can not be 100% here , I do not have SQL), but I would not recommend not to specify any type of command on internal selection, such as the built-in package indicator changes that change your results. Select <*>

  from * (select the top 10 * from mytable) x.mycolumn asc as the command    

SQL query using Date and Time -


I need some help with query

I use GETDATE as of today's date I would like to do and specify from 6:00 AM to 6:00 PM

For example, something like this:

where "current date 06:00:00" And "current date 18:00:00" between t_stamp

GETDATE this SQL server Appears to indicate - Please include this information in the future.

One of several ways will be:

  where t_stamp between the convert (DATETIME, CONVERT (VARCHAR (10), GETDATE (), 126) + 'T06: 00: 00 ', 126) and convert (DATETIME, CONVERT (VARCHAR (10), GETDATE (), 126) +' T18: 00: 00 ', 126)   

Strange I know There are a million different passages of the same answer.

objective c - iOS url scheme to open specific youtube page in youtube app -


To open a special user's profile to YouTube, IOSube: // user / myusername but that's for work Did not know.

After the text "itemprop =" text ">

YouTube page in the YouTube app (if installed on this device to open) you can check the device Whether or not the page can open:

 YouTube application for NSString  // URL scheme * youtubeURL = "@YouTube: //www.youtube.com/user"; // Page name (or channel name) NSString * youtubePageName = @ "YourPageName"; // Check whether the device can open in Youtube app if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: [youtubeURL stringByAppendingString: youtubePageName]]]) // Open in UT applications [UIApplication sharedApplication] openURL: [NSURL URLWithString: [youtubeURL stringByAppendingString: youtubePageName]]]; } Else {// If the device can not open in the YouTube app, open the page in the browser. [[UIApplication shared application] Opal: [NSL URL URL string: @ "http://www.youtube.com/user/YourPageName"]]; }   

This solution worked for me

Edit iOS 9: In the Info.plist under the URL scheme of the target app, LSApplicationQueriesSchemes Should be added.

Here is a related post:

dom - How to Remove the Parent Div using PHP DOMDocument -


  $ html_string = '& lt; div वर्ग = "उद्धरण" post_id = "57" style = "border: 1px ठोस # 000; पैडिंग: 15px; मार्जिन: 15 पीएक्स; " उपयोगकर्ता नाम = "david_cameron" & gt; & lt; मजबूत & gt; & lt; span शैली = "फ़ॉन्ट-आकार: 200%;" & gt; मेरा नाम राशिद फारूक & lt; / span & gt; & lt; / strong & gt; & lt; / div & gt; ; ';   

मैं माता-पिता div को निकालना चाहता हूं और केवल निम्न आउटपुट प्राप्त करना चाहते हैं

  & lt; strong & gt; & lt; span style = "font-size: 200% ; "& Gt; माई नेम डेविड कैमरॉन & lt; / span & gt; & lt; / strong & gt;   

मैंने कोशिश की है

  $ dom = नया DOMDocument; $ Dom- & gt; loadHTML ($ html_string); $ Divs = $ dom- & gt; getElementsByTagName ('div'); $ InnerHTML_contents = $ divs- & gt; आइटम (0) - & gt; textContent $ आंतरिक एचटीएमएल कॉन्टैक्ट को प्रतिध्वनित करें   

लेकिन यह मुझे केवल 'मेरा नाम डेविड कैमरन' देता है और सभी टैगों को पट्टी करता है। मैं कैसे केवल माता पिता div निकाल सकता हूँ और div में अन्य सभी HTML सामग्री प्राप्त कर सकता हूं?

उपयोग करने का प्रयास करें यह फ़ंक्शन

  फ़ंक्शन DOMinnerHTML ($ तत्व) {$ innerHTML = ""; $ बच्चों = $ element- & gt; childNodes; विदेशी मुद्रा (बच्चों $ $ बच्चे) {$ tmp_dom = नया डोम डॉक्यूमेंट (); $ Tmp_dom- & gt; एपेंड चाल्ड ($ tmp_dom- & gt; आयातनोड ($ बच्चा, सच है)); । $ InnerHTML = ($ tmp_dom- & gt; saveHTML ()) ट्रिम; } $ आंतरिक एचटीएमएल वापसी; }   

जैसे

  $ dom = नया डोम दस्तावेज़; $ Dom- & gt; loadHTML ($ html_string); $ Divs = $ dom- & gt; getElementsByTagName ('div'); $ आंतरिक HTML_contents = DOMinnerHTML ($ divs- & gt; आइटम (0)); प्रतिध्वनि $ आंतरिक HTML_contents   

आउटपुट

  & lt; मजबूत & gt; & lt; span शैली = "फ़ॉन्ट-आकार: 200%;" & gt; मेरा नाम राशिद फारूक & lt ; / span & gt; & lt; / strong & gt;    

javascript - How to get Bounding Box coordinates for my google map window -


I am working on a project that includes Google Maps API V3 and Postgres.

What do I want to do is pass the bounding box coordinates (bottom left and upper right) of my map window to postgrass and get POI location for the map window generated at a specific zoom level.

How can I get this? .? any idea? Is there a direct function already in API V3?

I have found this but it does not work for me

Using the Google Maps API v2, use the Google Maps API v3 equivalent

The limits will not be available until the border event has been removed, so it is bounds_changed Wrap in a listener for

  google.maps.event.addListener (map, "bounds_changed", function () {// Send new limitations back to your server warning ("map limit {" + Map.getBounds ());});    

updatepanel - file upload control which is inside gridview is not working inside update panel in asp.net -


File upload control is not working ..

File upload control is inside gridview and grid Update the panel is inside the panel.

When I'm uploading a post backed file upload then the forum HiFile is giving me false if there is a file, it is also false.

Please any body can help me

Add your gridview as a trigger for your update pencil

angularjs - Angular Validation $parsers -


When we have a controller or ng-model-controller, then we

  ctrl You can. $ Parsers.push (function (view) (ctrl. $ SetValidity ('valid', true;)});   

And finally the $ digest automatically render and validation What happens if I want to validate an area on the scars and I

  element.blur (function () [[validations] ctrl. $ SetValidity ('valid', incorrect) ;})   

And the results do not change the elements of HTML into NG-Banded, how to render this change?

You ctrl. $ SetValidity ('valid', false); within

  to claim the claim. $ Applied (function () {ctrl. $ SetValidity ('valid', false);})    

javascript - How to get available font weights? -


Is there a way to get a list of weights for special fonts in JavaScript?

I want to make a selector like Photoshop.

Enter image details here

< Div class = "post-text" itemprop = "text">

I am not clear about my end goal, though ....

If you are using something like Google Fonts You should know all possible weight already available in other words if you supply your font, you are the owner of all available.

Write data bytes to a file at an offset in java -


I want to write data to the file at various offset. Example, at position 0, (size / 2) at the same place (size / 4) places, etc. The size shows the file size of the file that is to be made. Is it possible that you can create separate file parts and join it?

Well you can use anywhere in a file to write - reach the right place Use, and start writing.

However, it will not byte place at those places - it will only overwrite them (or eventually add data) if you have the current file length Are finally writing, of course). It is not clear whether you want or not.

datetime - SSRS Date Range Filter -


I want to apply the date range filter on a report such as the SCSM default report in my report I used this query IncidentDimvw.CreatedDate Between (@StartDate) AND (@ENDDATE)

In the parameter properties, I have selected DataType Date / Time that I Like a calendar gives a date picture, but I just want some interactive view here.

You will not get it from that box, you get the calendar. If you want something like this, then you have to develop your user interface to run the report

window blocked when the application is running c# -


I have a small application coded on C # (Visual Studio 2012), when I run the application It works properly so that I can not click on the window or move it when the application is running, how can I solve this problem until the process is finished?

You can implement it.

To do this, just drag the control BackgroundWorker on the form from the toolbox and select the background worker you created and double click on it. Now separately from the URL you need to separate in this event.

Example:

  // Suppose we have a background worker, who can post a private zero background worker from the Door (Object Sender, DoWorkEventArgs e) {// put code Here}   

Now in the triggering block of code, call backgroundWorker.RunWorkerAsync () .

Example:

  Private ButtonDroker_click (Object Sender, EventArgse E) {backgroundWorker.RunWorkerAsync (); }   

Just be careful and do

windows - Strange output from PHPUnit -


I have installed PHPUnit through peer, and I installed the WordPress Plugin Test () to test my WordPress plugin Has been under development.

The problem is that when the test runs normally, I am getting the following output:

  is running as a single site ... to run the multisite , Use - C multisite.xmlAjax test is not running ... To execute these, use the --group ajax by PHPEnit 3.7.21 by Sebastian Bergman. E: \ LocalWebServer \ dch \ c \ my-wp-installtion.dch \ wordpress-test \ wordpress \ wp-content \ plugins \ myplugin \ phpunit.xml [41; 37 mf [0 m [36; 1 ms [0 m time: 1 second, memory: 30.50 MB was 1 failure: 1) CDOAjax_Tests: test_tests failed to say incorrectly that is incorrect. E: \ LocalWebServer \ dch \ c \ my-wp-installtion.dch \ wordpress-test \ wordpress \ wp-content \ plugins \ myplugin \ test \ test_CDOAjax_tests.php: 7 [37; 41m [2 Caffeure! [0 m [37; 41m [2K Tests: 3, convulsions: 2, failures: 1, dropped: 1. [0m [2K]   

I do not know if it helps, but Phpunit.xml includes the following:

  & lt; Phpunit bootstrap = "bootstrap_tests.php" backupGlobal = "incorrect" color = "true" & gt; & Lt; Testsuites & gt; & Lt ;! - Default test suite for running all tests - & gt; & Lt; Testuite name = "cabdriver" & gt; & Lt; Directory prefix = "test_" suffix = ".php" & gt; Trial & lt; / Directory & gt; & Lt; / Testsuite & gt; & Lt; / Testsuites & gt; & Lt; / PHPUnit & gt;   

As you can see, there are some weird characters in PHPUnit output, such as the last line in which [0m [2k.

My system is a Windows 7 and

so I can fix that problem in any way, because the output is not so clear to read.

Kind of

This Unix console There are color codes for and they are hard coded in the framework framework, as you can see here:

Example: line 500 to 50 9

  Public function addError (PHPUnit_Framework_Test $ test, exception $ E, $ time) {if ($ this-> color) {$ this-> WriteProgress ("\ x1B [31; 1mE \ x1B [0m"]; } And {$ this- & gt; Write progress ('e'); } $ This- & gt; Final TestFailed = TRUE; }   

I believe that you can hide the attributes color = "false" settings in your phpunit.xml file:

  & Lt; Phpunit colors = "false" & gt; & Lt ;! - ... - & gt; & Lt; / PHPUnit & gt; You can read more here:   

ruby on rails - Store form parameters between two pages? -


I have a form that is displayed in two pages. Page A and Page B

The form works properly and posts correctly using GET on the current page.

However, when I am on page A, submit the form, and Page B does not contain page values ​​because params have not been posted for it.

Should I use the session to keep my search form parameters from Page A and set them on the page when this B is loading?

The best way to go about this is either in session (if it is too small) Or in hidden areas (if it has a lot of content for a lot of content).

MS SQL Server 2008 error on GROUP BY -


I have a table that I'm trying to clear, so I'm the first in the table for each ClientId The address should be

table addresses in these columns

  Pk [Id] [ClientId] [AddressLine1] [AddressLine2] < / Code>  

I use the query:

 select  * ORDER client ID   

result = < / P>

  1 1 fu bar 2 1 fu 2 times 2 3 fu 3 times 3 4 1 fu 4 times 4 5 2 fu times 2 9 2 fu times 5 97 2 fu times 6 8 3 fu 2 times 7   

expected result =

  1 1 foo bar & lt; - The first match for the client is - 1 5 2 foo bar2 & lt; - The first match for the client is - 2 8 3 foo2 times 7 & lt; - The first match for the client is = 3   

This needs to work for n clients

I tried

  The customer id   

is the resultant error in the SELECT * FROM addresses group (the column 'id' is invalid in the selection list because it is not a composite function or a block by group.)

What's missing here?

SQL Server requires that when you use a group, you can select columns in the selected list Must use a composite function or add them to Group BY.

Your original query can be changed to use the following:

  An .id, a.clientid, a.address1, ClientID, client ) Select from IDE Client from address group) at a.clientid = d.clientid and a.id = d.id;   

As you can see, it uses a subquery which gives the minimum for each clientId , It only clientid . Then you join this table to return only those rows with the minimum ID for each customer.

interface - C# inheritance and method signatures -


I am working on a class which needs to be run on a different process based on the type of object I need what I pass. I thought overloading could work here, but I have a question. Say I have two interfaces:

  Public interface IEmail {some properties ...}   

and

  Public Interface ISEELEmail: IEEML {some more property ....}   

and a class to process on these objects:

  public class email processor {Public Zero Process E-mail (IEML Email) {Accessories; } Public Zero ProcessEmail (IspecialEmail Email) {different stuff}}   

My question is is that ISpecialEmail got from IEML, is the signatures of these systems sufficiently different to overload ? My basic idea is that the ISEELmail emails will also trigger the IEML signature, because this interface also applies to technically as well.

Thank you for your help.

It depends on how you call methods

For example, suppose you have email: email and special email: ispecialEmail . If you have declared a list of emails:

  list & lt; IEmail & gt; Email = New List & lt; IEmail & gt; {New email (), new special email ()};   

and then ran

  foreach (different emails in email) {EmailProcessor.ProcessEmail (email)}   

This will call for the public zero process email - because the call binding happens at compile time (i.e. it does not work as you wish Will).

If you do something similar, it will also fail:

  var email = GetEmail (); // either IEmail or IExtendedEmail EmailProcessor.ProcessEmail (email); // will only call the Process E-mail (IEMEM)   

So, the polymorphism with those signatures will fail.

However, the following will work:

  var email = GetEmail (); // returns only IEmail var enhanced email = GetExtendedEmail (); // only IExtendedEmail EmailProcessor.ProcessEmail (email); // All Process Email (IEEME) Email Processors Processmail (extended email); // Process is called e-mail (IExtendedEmail)    

java - Mockito- calling real method -


I have a class that has 2 ways, I want to duplicate the class and then mimic the first method , But not the second.

Example

  class C {void m1 () {...} boolean m2 () {... return flag;}}   

unit test code:

  c cock = Mockito.mock (C.class); . (Mockito.doNothing) when (cMock) .m1 (); Mockito.when (cMock.m2 ()) thenCallRealMethod () .; The strange thing is that M2 is not being called.  

Do I miss anything here?

This is also where Mockito.spy can be used is. This allows you to partial mocks on real objects.

  c cock = Mockito.spy (new C ()); . (Mockito.doNothing) when (cMock) .m1 ();    

java - Processing heavy operations with doGet() method on a servlet -


The tool I'm working on can send a GET request only, and I am using that information The process requires the request. This operation returns a string that contains the URL that I will use for redirection.

After doing some research, I have found that doGet () method is used for pre-processing, while doPost () can be used for post processing.

Is there any way I can take these heavy actions using the doGet () method? If I want to use the doPost () method, how can I "turn on" my request in the POST request?

Thank you.

EDIT: I have already tried to process these heavy actions within the doGet method. But it seems that unless the URL string is used for redirection, the servlet does not wait. I have read that trying to synchronize based on the performance of your doGet () method is a bad thing.

Edit 2 - What I'm trying to do: The tool I'm working on is an Oracle. You can launch custom actions within the client including web applications. A GET request will be sent to the application by launching a custom action, which will contain all the information about the page from which you launched the application (users, items selected, etc.) and then use this information to take huge action Does what I told about it In operation, using a single ID on the Oracle client, creating a query based on the selected item, creating XML data and using external programs located on the Oracle server, a new session is created. Finally, it gives a download URL from which you can download a PDF report, and I am using this URL to redirect the application.

Here is the servlet code:

  Package .servlets; Import java.io.IOException; Import javax.naming.InitialContext; Import javax.servlet.ServletConfig; Import javax.servlet.ServletException; Import javax.servlet.http.httpServlet; Import javax.servlet.http.HttpServletRequest; Import javax.servlet.http.HttpServletResponse; Import com.actions.agileSessionHandler; Import com.actions.BOMComparisonReport; Public class DefaultServlet HttpServlet {Public Zero doGet (HttpServletRequest request, HttpServletResponse response) enhances ServletException, IOException {agileSessionHandler handler = new agile session handler (...); BOMComparisonReport Report = New BOMComparisonReport (...); Handler.setSessionObject (request); String url = report. GenerateBOMReport (...); Request.setAttribute ("redirectURL", url); This.getServletContext () GetRequestDispatcher ("/WEB-INF/BOMCompDefault.jsp") Forward (request, response); }}    

I already take action on these heavy Attempted to do the operation within the DoGet method but it appears that unless the URL string is used for redirection, the servlet does not wait

it seems Just like you're firing a new thread and forgetting it completely. This is a very bad idea in the Java e environment. Do not do this, just do processing in a very thread (i.e., no one makes new threads) ). If you really intend to do it in asynchronous form, then you should use the example method for voting to inform the customer about progress / results on @ asynchronous on EJB and then Use or push.

It does not matter whether you get it GET or Post Request issue, request idempotent, bookmarkable, exactly executable with exactly the same result every single SQL SELECT Think about the query, there are no post requests. Think of executing SQL UPDATE or DELETE queries that are being used to manipulate data at the end of the server. You do not want your data to be modified or deleted on every F5 press or when a searchboat comes with indexing of GET links, right?

VB.NET Shared properties in Classes in ASP.NET application -


This may be a silly question, but if I have ASP.NET / VB In a net application, a shared asset (not only accessible by the name of the class and not necessarily the class immediately) and a user, will be currently logged in, he will set the property - will it share the same value as the same ASP.NET application Can the other user be used at the same time, or the price is limited to the user who was set it?

Everyone is loaded once by the class server process and the memory to serve all requests Lives in Therefore, the shared assets will show the same value for all page requests.

If this was a problem with the website, then the manufacturer used a shared database object and users would have to get each other's search results.

vba - Save custom macro toolbar modifications in Excel 2011 for Mac -


I produced several custom macros in Windows, modified XML so that custom ribbon tabs appear in the 2013 version of Windows, And everything was very good.

Now I am trying to create equivalent functionality for Mac 2011 for Excel. I did the following: View & gt; & Gt; Toolbar & gt; & Gt; Custom toolbar and menu then I went to the "Command" toolbar & gt; & Gt; Pulled the smilefase macro on macros, and the main toolbar. I then changed the images, modified the text, and it worked locally.

For redundancy, I also added a new menu to "Toolbar and Menu" and added all my macros to all those toolbars, which I did not see as kind of a goofy, monotonous floating box Macros attached to the document using the "attached" button

However, when I send a document to colleagues, only one thing is visible, which is the obscure floating custom toolbar, Iks is no map to map, and is not my custom image button.

How do I do this?

The latest version of Excel 2011 (14.3.5) custom toolbars in a file in a specific user folder Saves:

Users / [Users] / Library / Application Support / Microsoft / Office / Preferences / Office 2011 / Microsoft Excel Toolbars.Clicks

(Original Source)

When I saved an Excel 2011 workbook with a custom toolbar on a Mac, and this Transferred to another toolbar did not appear when I have Microsoft Excel Tulbers. Added the XLSX file to the top (and left it at the right place), Toolbar appeared.

Note: This location may be specific to recent versions of Office 2011; In older versions, they are stored in user / [user] / library / preferences / Microsoft / Office 2011.

Short-term, you may need to distribute the Toolbar file with a spreadsheet, as well as some means to copy it (via script and / or manual instructions) to the expected location.

& lt; Pure speculation & gt; The long-term is probably a way of overriding this default behavior and point to the 'local' copy of the toolbar stored in the distributed file or, perhaps you can use the Toolbar file as a template for a distributed spreadsheet. & lt; / Net speculation & gt;

Where is my apk file for my android application? (via eclipse) -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 6 जवाब

    मेरी एपीके फाइल कहाँ है? मैंने एक ऐप और एक लाइब्रेरी प्रोजेक्ट बना दिया है जो इसे पर निर्भर करता है। यह इम्यूलेटर में ठीक है ...

    लेकिन बिन में कोई .apk फाइल नहीं है

    क्या ऐसा नहीं है?

    एपीके को bin / फ़ोल्डर के अंतर्गत मिलना चाहिए। सुनिश्चित करें कि आप संकलन करें, और केवल परियोजना का निर्माण न करें:

    संपादित करें जैसा कि क्रिस ने कृपया ध्यान दिलाया, bin / आमतौर पर आपकी प्रोजेक्ट डायरेक्टरी के अंतर्गत पाया जाता है, जैसे पथ / को / प्रोजेक्टर / बिन

c# - regex not giving all the possible matches -


I have to get all the possible matches for the word in the regular expression given in C # and C #. But the Regex.Matches () function is not giving it up. For example

  Regex.Matches ("datamatics", "[^ aeiou] a [^ aeou]")   

returns only two matches

  dat mat   

This is not giving "Tam" as a match. Can someone explain to me why he is not giving "Tam" as a match and how can I get these three?

You can not get overlapping matches in Reggae You have several ways of working around it, though . You can either use Regex.Match , and specify a preliminary index (use a loop to go through your entire string), or you can see, Or look like this:

  (? = [^ Aeou] a) [^ aeou]   

This works because see and look-eyed characters Do not consume it, it gives a mail in which the match is indexed, because you have to use it instead of capture, because Only one letter has been captured.

rdf - museum ontology development -


Currently, I serve cultural heritage for our local museum data to serve as a metadata and upper level meaningful model Join the development. Our primary goal is to move data linked linked data to the cloud to enrich the information about the objects of our museum collection. There are already many projects in this area, for example, Europe, Amsterdam Museum Linked Data, Smithsonian American Art Museum Linked Data, and so on.

If you are developing ontology for a cultural heritage, then what is the right way to identify the existing otology for things? And where to start?

You may want to take a look at curate , description of museum stories I have used the following comprehensive list of useful, ontologies, which is classified by keywords: < / Html>