Posts

Showing posts from January, 2012

mysql - A multitude of the same id in an WHERE id IN () statement -

I have a simple query, which increases the value of the field by 1. Now I was looping on all the IDs and the fire seemed to be a query for each of them, but now these things are getting huge resources, I want to customize it. Normally I'll just update table SET field = field + 1 WHERE id (all id here) but now I have problems that there is ID That's twice (or more, I can not know on forehand). If the query looks like this, there is a way to run twice for ID4: UPDATE table SET field = field + 1 WHERE id IN (1, 2, 3, 4, 4) , 5) thanks, lordstyx Edit: Sorry for not being clear enough. ID here is an Auto Ink field, so it's all unique ID. The ID that is to be updated is coming indirectly from users, so I can not predict which ID is going to be made if IDs are (1, 2, 3, 4, 4, 5) I have to increase the line area with ID 4 to 2, and with all the rest 1. if (1, 2, 3, 4, 4, 5) Comes with a SELECT id. query, you can do something like this: Add your table...

html - CSS - vertically centering inside BUTTON element -

I am trying to create a row with the button, where the button inside the button is vertically aligned between the button. All buttons must have the same height The problem occurs when an image is used inside a button I have created a small example: Why is not the third button to combine with the second 2? I think the button should be enough for small content? If I have vertical-align: middle; If you use then

ios4 - Core Data fetch by property count -

I'm just trying to get the object that contains a large number of nsset, then in Core Data 0 something like this Get all the items, which are the object.set & gt; "Text"> I was able to find a way to work: NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "Set. @ Count> 0"]; If there is a better way, please tell me, I am posting here to help anyone with the same problem. Thanks

php - Login system with shopping cart -

For exmaple, we have a site that sells car wheels I am not registered there and the wheel in the shopping cart I add (this is stored in cookie ) After entering, I get this wheel in my account shopping list. What's wrong: What if someone else added another wheel from my computer and I will get it in my shopping list after login. I do not understand how to solve this situation. If you use a cookie to bind a shopping cart to a user, you have a problem Not because cookies are typically specific to a fixed browser on a particular account on a computer.

Get all values in one array PHP -

मेरे पास यह सरणी है: array (3) {[0] = & gt; सरणी (3) {[0] = & gt; सरणी (1) {[0] = & gt; स्ट्रिंग (2) "14"} [1] = & gt; स्ट्रिंग (2) "12" [2] = & gt; स्ट्रिंग (2) "13"} [1] = & gt; स्ट्रिंग (2) "10" [2] = & gt; स्ट्रिंग (2) "11"} वहाँ एक स्ट्रिंग में आउटपुट सभी मानों के साथ कुछ PHP फ़ंक्शन है इस तरह: सरणी (5) {[0] = & gt; स्ट्रिंग (2) "14" [1] = & gt; स्ट्रिंग (2) "12" [2] = & gt; स्ट्रिंग (2) "13" [3] = & gt; स्ट्रिंग (2) "11"} आप उपयोग कर सकते हैं: $ आउटपुट = सरणी (); Array_walk_recursive ($ inputArray, create_function ('$ val, $ key, $ obj', 'array_push ($ obj, $ val);'), और आउटपुट)

java - deleting an object from an array -

There is an array of objects of my custom class and I want to delete a random object (selected by certain criteria). How can I do this and order the array? Naturally, the elements will be transferred on the left side, but it is not enough to remove the element and I need help in preparing the argument. This is what I am doing but it does not work properly for this: ( public static zero deletion record (customer [] record, intexide) {int pos = 0 ; // Indicator Boolean found = false; for (int i = 0; i & lt; count; i ++) {// If there is number of elements in the count (record [i] .get_accountid () == AccId) {Found = true; pos = i; break;}} If (found!) For System.out.println ("record does not exist") (int j = paus + 1; j & lt; count; j + +) {Record [J-1] = Rick [J];} You can only move elements left because This will be overwrite items for deletion. Generate public zeros (object [] A, index index) {for (int i = index + 1; i & lt; a.length Assume that th...

android - writing too many times in a database -

I am trying to store some GPS data in the database which I get from a KML file using DDS , The problem is that every time I run my program, I store this data. This means that I have stored it several times, after which I will have to create a sequence based on this GPS data which is stored in esclaim. The problem now is that I do not have this route correct because there is a mess in my database. I have stored too much data for a lot of time. Does anyone know how I can do this? I am running on Android 2.1 Re-write the data base initialization argument so that it stores an indicator The data base can be started. (The shared context is good for this.) Then test for the indicator and leave the data base initialization on the start-up, if the indicator shows that it has already been done.

list - Is there a data structure like stream, but weak? -

Weak as weak references In fact, I need a sequence of sequences where some of them can be allocated without having to be done now. scalaz.EfhemeralStream what you want.

Tips before starting a project -

I am going to start a client / server project This project includes an XE (customer) will be installed. Customer users will communicate with the website (server) collected from the PC. The content of the website (like a social networking site) will be based on the data obtained from the customer. The site can be considered as a social networking site that will feed on data received from the client. Occasionally, the server will send the information to the client. The client will display the information received to the user from the server. Any suggestions, suggestions on which I have to think before starting this project, are appreciated. Thanks in advance, P> John. Personally, I prefer desktop applications. However, when net applications are developed, you should take into account the benefits of browser-based applications. I go "Web application vs. desktop application" and found both HTML5 and JS are very strong today and almost any desktop applicati...

authentication - App Engine Login Redirect Fails -

On March 1, 2011 App Engine has changed its entry flow, my app (see broke Google Groups). This issue also came in this stack overflow. Suggested perform answer "App redirected. That createLoginUrl only a URL to the URL the application to work when released. After another app / host is to be sent to the user needs to login and then to your app redirects " and " a redirect handler on your application. that target parameters continue Is and Setting it up is the final redirection on your actual goal of sending it ". I am asking the question how to do this work. My application exposes two GAE apps, one GWT front end, and the rest to a REST API. Here is the current flow GAE UserServiceFactory.getUserService (). Browse for the user and GWT makes a JSONP call to do a servlet. / User checks the servlet. GetCurrentUser () to see if it's empty. For those not logged in, it is empty, and the servlet returns JSONP that the user is not logged in. GWT code mess...

Problem Reading XML DOM Element using PHP -

I failed! Here's my problem: I get a DOMElement code: $ ref_cell = $ new_row-> childNodes-> Item ($ j); I used the properties of the said code: e ho $ ref_cell-> nodeValue; The computer says ... quote: is trying to get non-object property ... I code I'll try: $ ref_cell echo; The computer says ... quote: The purpose of the class of domalement can not be converted into string ... Can anyone explain this? No insight will be helpful - I am going to remove my face and share my keyboard through monitor ... It is possible that the line is empty and there is no hair node. I will start by checking to make sure that there is valid material in each level at the cost of the question.

Prevent multiple web service calls via JQuery AJAX -

I'm starting to integrate some jQuery calls into my classic ASP pages, but many times Want to stop sending multiple server queries What is a good practical way of doing this? It really depends on how your call looks. For example, you can disable the button that sends the call using the before function. You can then re-enable it when you can get the success or error : $ ('# test'). ) {Var obj = $ (this); $ .ajax ({beforeSend: function () {toggleBtn (obj);}, url: '/ echo / html /', data: 'whatever', success: function (data) {// what data with whatever ... Warning ("When a warning is visible, JS is stopped, see the button. After clicking OK, it is being enabled."); ToggleBtn (obj);}, Error: Task () {// Whatever the error with ... // Re-enable the button, you need to do this, otherwise try again without error / / reload the user page And discover. ToggleBtn (obj);}}};}); See one Use a simple frame function to allow you to reuse ...

java - Running JUnit tests with Maven under Eclipse -

I have installed the plugin m2e for the first time on Eclipse. I can run a simple Genuine (version 4) exam from Eclipse, but not with pom.xml (alt-click, Run as, Maven Test). I think I need to search Maven for that class, but I do not know how. Also, I could not find "Janet 4" in the group: only "version" 3.8 version 1 is available. Do I really need to write the test for version 3.x and not version 4+? How to fix it? Think of me as a newbie with Maven: She is doing me the same. So please tell me what I need to do, unless you talk about Artifact Technobbble. I could set up as a pollen in the form of failure and with these concepts now I have been completely lost. Thanks You can run with Maven on June 4. You only need June 4 dependence in your pom. See: View: By default, make sure that the code looks for files with * test.java .

firebird - Changed php-interbase default transaction behaviour -

I have some PHP CLI scripts that run for a long time (24 hours plus) and although they are regularly 'Commits I have some problems with orphan transactions - possibly due to the crash of the script. My solution was to do the following transactions - it was a year ago that I researched it and the exact reasons for these settings can not be greatly missed, but it can solve some problems with the database seemed to. $ dbh = ibase_connect ($ dbhost, $ dbuser, $ dbpass); $ Trans = ibase_trans (IBASE_WRITE + IBASE_COMMITTED + IBASE_REC_VERSION + IBASE_WAIT, $ dbh); Now upgraded to 5.3.5 PHP and it has been found that the ibase_trans line generates a split error. There is a note on the Php ibase_trans page: "The behavior of this function has been changed to PHP 5.0.0. The first call on Ibase_trans () will not return the default transaction of a connection." So my question is whether can I set transaction arguments for default transaction ... secondary question, whe...

How to Replace content inside custom tag in MediaWiki before saving to database? -

First of all, I have MW 1.16 and 1.17, with PHP 5.3.5, MySQL 5.5.8 and Apache 2.2 Is established. .17 I have written a simple $ wgExtensionFunction which does not do anything now $ wgExtensionFunctions [] = "wfTestExtension"; Function wfTestExtension () {global $ wgParser; $ WgParser- & gt; Sethook ("myTag", "rendertst"); } Function renderet ($ input) {return $ input; } What do I have to do, if I do & lt; MyTag & gt; Blah blah blah & lt; / MyTag & gt; If I write in the Add or Edit form, I want to be able to change the content inside my socket before saving the database. What system should I use for this? I'm assuming the hook? For example, with the hook of the article, the $ text worker already has & lt; MyTag & gt; is stripped, so there is no way to parse the string and find out what it was originally inside & lt; MyTag & gt; I have spent hours trying to find something on Google, but I have almost...

PHP Regex to remove non-related content but leave content within blocks -

I need help to fix my regex, say that the text is as follows: Bladder bla1 bla1 bla1 bla1 bla bla bla2 something else bla bla bla i think bla1 and bla2 removed everything Gone, can anyone help me with those tags? Thank you. To delete the tag, try again: $ Str = 'bla bla [bla1] some [/ bla1] bla bla [bla2] something else [/ bla2] bla bla bla'; $ Result = preg_replace ('~ \ [([^ \]] +) \]. *? \ [/ \\ 1 \] ~', '', $ str); Var_dump ($ result);

android - xml game info secure on mobile? -

I have never created a game for mobile, so I'm not sure exactly what the proper conference for level information Actually I am thinking that I am included in an XML file that I add to the local display for the app then the level of detail (item status, etc.) is loaded from that XML file, so when I update the game updates Have to do, and add more level They are, I only have users downloading a small XML file. Is this method safe or is there any other way to do this? Security may be very complicated on BlackBerry, this article is for good summary of various security features. Check out the other end of the page: There are some official BlackBerry docs on this topic: FII, most of the information is unauthorized users, or other malicious Focus on protecting data from apps Personally, I will not be much worried about a sophisticated hacker who changes my XML, as long as I was not giving a reward for achievements!

create a file bundle to submit for a blackberry app to app world -

How do you create a file bundle for the BlackBerry app in the app world? I already answered it on the stack overflow question "" Rim has a document with exact requirements for a submission bundle for the app for the Blackberry App World: ""

c++ - Errors with #define -

मेरे पास एक फाइल है जिसमें कई #define स्टेटमेंट जैसे - #ifndef UTILITY_H # परिभाषित UTILITY_H # परिभाषित BUMP 7; # WHEEL_DROPS 7 को परिभाषित करें; # वॉल 8 को परिभाषित करें; # CLIFF_LEFT 9; # CLIFF_FRONT_LEFT 10; # CLIFF_FRONT_RIGHT 11 को परिभाषित करें; # CLIFF_RIGHT 12 को परिभाषित करें; #VIRTUAL_WALL 13 परिभाषित; ... ... #endif सूची में लगभग 42 विभिन्न मूल्यों पर जाता है मैं इस फाइल को मेरी दूसरी फ़ाइलों में शामिल करता हूं, लेकिन जब भी मैं इनमें से एक स्थिरांक का उपयोग करने की कोशिश करता हूं, तो मुझे त्रुटियां मिलती हैं I एक विशिष्ट उदाहरण के लिए, मैं करने की कोशिश करता हूं - Sensor_Packet temp; Temp = robot.getSensorValue (BUMP); // लाइन 54 कॉट & lt; & lt; temp.values ​​[0] & lt; & lt; endl; मेरे द्वारा प्राप्त त्रुटियां हैं - main.cpp: 54: त्रुटि: अपेक्षित '' ????) ??? पहले एक "???"; टोकन main.cpp: 54: त्रुटि: अपेक्षित प्राथमिक-अभिव्यक्ति से पहले ????) ??? टोकन main.cpp: 54: त्रुटि: अपेक्षित '' ???? ;? पहले एक ????) टोकन ...

i want to use http authentication for web access, while still allowing cron job access (PHP) -

I am creating a unit test suite if I use HTTP authentication to access the test URL through the web Users want to destabilize, but I still want the users to set up a cron job that runs tests automatically, how can I do both? Two different scripts requiring the same library In a script you want the function you want, It runs - this is what you call from the cronatb. In the second, you do auth, then open the main function. If you are using basic http ath, and do not care about identity, then it is not all necessary - then again. Htaccess and. Htpasswd All you need is to check Apache user, Crunchb will ignore at least mechanism.

ruby - How can I add intelligent alignment of assignments and hashes to indent-region in emacs? -

When I have a code: a = 1 foo = 2 And I want to show it like this: a = 1 foo = 2 I-align-to-different Function defined here: Selection and function of the area is underway. I can also change the function to work for hash by changing '=' in the function definition; = 'Gt;' And he has: bar = {: a => 1 ,: foo = & gt; 2} Change to: bar = {: a => 1 ,: foo = & gt; 2} I want this alignment to be done on all my codes when I select the entire buffer and start the indent area but I think it should be done wisely - Not every aligning '=' in the buffer is equal to 'fourth', instead it is doing the job for block and individual hash literals. Edit: To clarify this last part, I have the following buffer: a = 1 foo = 2 some_other_code def Fn bar = {: A = & gt; 1 ,: foo = & gt; 2} end I want to 'cx' (select the entire buffer), 'mc-' (indent-field) and it looks like this: a = 1 foo = 2 some...

java - I am getting the error .class expected but can not find a solution to change the line! Any ideas? -

विधि है - निजी वर्ग DisplayNum ActionListener कार्यान्वित करता है {सार्वजनिक शून्य कार्रवाई कार्रवाई (ActionEvent e ) {IntInput = String.valueOf (सरणी []); FinalArea.setText ("\ n" + intInput); }} अब समस्या int इनपुट लाइन के साथ है, मैं एक। वर्ग की उम्मीद कर रहा हूं और मुझे बताया गया है कि मुझे सामान्य रूप से लाइन बदलने की ज़रूरत है, लेकिन पता नहीं है कि इसे क्या करना है। intInput स्ट्रिंग के रूप में घोषित किया जाना चाहिए। सरणी सरणी या सरणी [0] होनी चाहिए, और इसे मुझे लगता है कि घटना से प्राप्त किया जाना चाहिए।

javascript - how to prevent this function to be executed more than 2 times in x miliseconds? -

When I get to the bottom of the scroll, how can I stop it to execute twice? if ($ (window) .scrollTop () == $ (document) .hit () - $ (window) .ight ()) {last_msg_funtion (); } The option I see is: I tried to set a var loading setting == Incorrect and, some like : if (loading_already == incorrect) {loading_already = true; Last_msg_function (); SetTimeout ('refresh_loading', 300); } Where refresh the function_loading () {loading_already = false; } But is there any suggestion for this? Thank you! loading_already = true; You have == which is the Boolean operator, not the assignment.

html - what does this mean @-moz-document url-prefix() -

I tried in Google but could not find a good answer, what is the code given below in CSS @ -moz-document url-prefix () {.className {}} Is it saying that only execute the code for Firefox, if doing so The best way to do this is to This means that the following applies only to Gecko Browser. url-prefix () indicates that only when the beginning of the url matches the mail passed in the url-prefix () method Is applicable. An example: url-prefix (http://www.domain.com/page1/) then CSS Will be followed only if the URL of the page starts with

c# - Data Token Names in MVC3 Route -

I am learning about MVC 3 and I could not understand one aspect of routing. If I have a route like below: route. MapRoute ("default", "{controller} / {action} / {ID}"); The route prevents each action on a parameter of the name id only! However, there is no restriction on the name of the controller or the work of this route. Of course I can define more routes, but there should be a better way to keep track of the way to accept data tokens such as ListID or FieldID. For example: I have a ListController with two actions: GetListByID (int listID) and GetFieldByID (int fieldID) In this case, I have to define two routes because the parameter name of the function is different, is there a better way to do this? Thanks! No, your actions can take any parameters, except that your parameter "ID" is if you had this action in the CartControler the public action URL Add / cart / add / 1234 (int id, int Quantity) / code ultimate, R ze...

php - What is difference between page with session_destroy() and without -

क्या यह सही तरीका है कि session_start () और एक ही पृष्ठ में हो? session_start (); पेज सामग्री session_destroy (); सत्र का बिंदु एकाधिक अनुरोधों पर उपलब्ध होना है। यदि आप session_destroy () के साथ एक सत्र को नष्ट करते हैं, तो सत्र अब उपलब्ध नहीं होगा। इसलिए, आमतौर पर, आप किसी भी पृष्ठ पर session_destroy () कॉल नहीं करेंगे, जब तक कि आप पूरी तरह से इसे समाप्त नहीं करना चाहते, जैसे "लॉगआउट" कार्यक्षमता। अगर आप को नष्ट करना चाहते हैं सत्र को आपको session_destroy () । से नष्ट करने से पहले सत्र को खोलने के लिए session_start () को कॉल करना होगा।

javadoc - Private member variables in Java docs -

Specified descriptions of the private member variables used by Gates / Setters in Jawadox, which describe the recipient and the setter should be there. Description of personal variable, like here: / ** * Name of this object * / personal string name; ... should not have details of its gates and setters. It should include the properties of this variable, the inorient (such as should never be blank ), and similar. Edit: Ah, I forgot your question. You were asked to explain why variables should be described in the details of the gates / sets, not the other way. They should not - even such a variable does not exist, the gates and the satars should describe their effect, in which the amendment of some abstract properties of this object (Or retrieval) This property is implemented by a private variable is not relevant.

php - Zend Studio formatter uses wrong format -

I am using when I press CTR + Shift + F, code is prepared like this $ adapter = $ this- & gt; GetAuthAdapter ($ form- & gt; getValues ​​()); $ Auth = Zend_Auth :: getInstance (); $ Result = $ auth-> Certify ($ Adapter); If (! $ Result-> is invalid ()) {$ form-> Set descriptor ('invalid credentials provided'); $ This- & gt; View- & gt; Form = $ form; Return $ $- & gt; Render ('index'); } But I want to be formatted like this $ adapter = $ this-> GetAuthAdapter ($ form- & gt; getValues ​​()); $ Auth = Zend_Auth :: getInstance (); $ Result = $ auth-> Certify ($ Adapter); If (! $ Result-> is invalid ()) {$ form-> Setdition ('invalid input'); $ This- & gt; View- & gt; Form = $ form; Return $ $- & gt; Render ('index'); } How to configure it? The format can be configured in the window & gt; Preferences & gt; PHP & gt; Code style & gt; Format & gt; Edit ... & gt;...

iphone In App purchase question -

Considering this scenario, the user downloads a zip file after an app purchase A. Then he updates the application for the new version. Now, is it to download the Ziff file again or is it still in the device? Another question: How do I verify that the zip file is downloaded? The file is still on the device: While upgrading, only the app Binary is replaced ( .app ). Stay tuned to the Documents directory and user default are insulated between two versions.

Exit code when python script has unhandled exception -

I need a method to run a dragon script file, and if the script fails with unrestricted exception python one Non-Ezro exit code My first attempt was to do something like this: import case if __name__ == '__main__': try: import & lt; Unknown script & gt; Except: sys.exit (-1) But it breaks many scripts, because __ main___ guard is often used to do it properly Have any suggestions for? Python is already asking you: $ Python -c "Increase runtime error ()" tracebacks (most recent call final): File "& lt; string"; Line 1, & lt; Module & gt; Runtime $ $ echo $? After some edits from OP, you might want to: import subprocess proc = subprosec POPEAN (['/ usr / bin / python', 'script-name']) proc.communicate () if proc.returncode! = 0: # Run Failure Code Second: # Run happy code. Correct me if I'm confused here.

End Windows application (but not simply terminating the process) -

I wished to end a certain Windows application happily without using mouse or keyboard shortcuts. I also do not want to end the application process. (So, "honestly".) In other words, I want to include my "exit process" of application. How can I do this? I do not feel nervous and dirty with codes and suspicious hacks, I do not even know where it is starting? | Press key to eliminate AutoHotkey is not good enough for me to press the simulation application: P Windows Task The manager uses the endoscope function for this: This function sends first good WM_CLOSE message.

iphone - Releasing 2 times? -

I'm confused about releasing the object that I first alloc / initialized and then copied. As far as I was deemed to be a memory management manual, I should allot the object by releasing the object twice and later I should have kept 2 values ​​in copying it? So the first release will be reduced from one to the other? If I release this twice, I am sent a message to the DLOK object. If I do this once, there is no problem in the application, but in my understanding of the Ogative C-MAM, there is one. Management :)))))) The only explanation that I can think of when you leave an object with a white reference, will it continue immediately so that no one will keep a count? Snippet bellow xmlElement is confused .... // LSAPNIPPET for code for TouchXML (CXMLElement * Results Results Healing in Result) {NSMutableDictionary * xmlElement = [[ NSMutableDictionary alloc] init]; // Create a counter variable in the form of "int" int counter; // Add the code as a key and node va...

node.js - process.env undefined in Node app -

मेरे नोड ऐप ला लाए जाने पर नोड server.js , process.env रिटर्न अपरिभाषित , इसलिए मैं किसी भी परिवेश चर का उपयोग करने में असमर्थ हूँ यह भी ऐसा लगता है जब मैं अपने ऐप को परिनियोजित करने का प्रयास करता हूं। कमांड लाइन से कॉलिंग process.env काम करने लगता है, हालांकि: $ नोड & gt; Process.env {MANPATH: '/ opt / local / share / man:', TERM_PROGRAM: 'Apple_Terminal', ... कोई भी गलत क्या हो सकता है? मैंने इसे समझ लिया। प्रक्रिया एक फ़ंक्शन है, लेकिन मैं अपने स्वयं के फ़ंक्शन को परिभाषित करता हूं (जिसे प्रक्रिया भी कहा जाता है) जो इसे ओवरराइट कर देता है मेरे फ़ंक्शन के नाम को बदलने से समस्या ठीक हो गई।

fiddler - how to create a request with FiddlerScript -

I want to launch intelligence from the command line and want to populate the request builder with the requested parameter. Is it possible that ExecAction (or otherwise) and FiddlerScript ? Can anyone start me with the required FiddlerScript ? I can not find anything in Docs ... Thanks Fiddles You You can generate any HTTP requests. Use the utilIssueRequest method and use it specifically. The composer must send a new request that you call FiddlerApplication.DoComposeByCloning (OS) , passing the session to display in the composer as the parameter.

using 'unique' in Matlab, preserving first occurence -

Hello everyone I have data that sometimes looks like this: time ... on / off. Value 50 ...... 1 ......... 70 50 ...... 0 ......... 70 50 .. ... 1 ......... 70 I want to delete the duplicate 'on' line, but also the 'off' line because it is redundant, and a 'close' my Bad for the script. It seems that with the unique 'first' logic should help, but I have no happiness. Any suggestions? Use unique with 'rows' logic instead of 'first' to remove duplicates 'on'. To remove 'off', a simple solution is to first set everyone to 'on', and then to uniquely Use A = [50 1 70; 50 0 70; 50 1 70] A = 50 1 70 50 0 70 50 1 70A (:, 2) = 1% Set the value to all / off 'A' on A = 50 1 70 50 1 70 50 1 70 R = Unique ( A, 'rows') R = 50 1 70 EDIT: To remove the 'closed' line, only when two neighboring rows are the same, you have to compare the neighboring rows. There are several ways to do thi...

font size - A Couple of CSS Questions. src:robot-or-not.com(css) -

body {background: # E2E2E2 url ("/ - / img / bg.jpg") दोहराएँ -20% -146px; रंग: # 45445d; रंग: आरजीबीए (0, 0, 0, 0.7); फ़ॉन्ट: सामान्य 100% / 1.5 कैलिबरी, कैंडारा, सेगो, "सेगोई UI", ऑप्टिमा, एरियल, बिना-सेरिफ़; } यह एक कोड स्निपेट है ... जिसे एक आलेख में दिखाया गया है .. रीस्पॉन्सिव वेब डिज़ाइन मेरे पास आलेख में सीएसएस के बारे में दो प्रश्न हैं। अगर मैं किसी साइट पर एम का उपयोग करना चाहता हूं तो मुझे समझ में आ रहा है कि मुझे मूल फ़ॉन्ट आकार की आवश्यकता है और फिर उन्हें TARGET आकार / आधार का आकार = ईएम क्या मुझे फिर पहले शरीर में "पीएक्स" में मूल फ़ॉन्ट आकार सेट करने की आवश्यकता है और फ़ॉन्ट में क्या होता है: 100% / 1.5 मतलब? मेरा दूसरा प्रश्न पृष्ठभूमि की संपत्ति के बारे में है .. क्या दोहराता है "-20% -146 पीएक्स;" यह मतलब है / करते हैं? मुझे दोहराने के बारे में पता है: दोहराव और पुनरावृत्ति- y, दोहराए x लेकिन इसके लिए आपने% या पीएक्स का कभी इस्तेमाल नहीं किया है .. उन्नत में किसी भी सलाह या जानकारी के लिए धन्यवाद .. मुझे आशा...

.net - ext.net / How to run server-side method on Row Click in GridPanel? -

Hey, messing about ext.net and running in some minor problems. I run a server-side method when a user clicks on a line in a gridpanel. For example, I read on the Internet that it should be straight forward, but it is not working. Then, I have GridPanel (in MyTest.aspx) & Lt; / Listeners & gt; and then the server-side method (in MyTest.aspx.cs) [DirectMethod] public zero set customer () {uint customerId = 0; // does not do anything) SetCustomer is not executed, but the listener is working I instead & rt; RowClick Handler = "SetCustomer" /> I I do & lt; Rocic handler = "alert ('test')" /> And if that works, any thoughts would be appreciated =) & lt; Rochelle Handler = "Ext.net. DirectMethods.SetCustomer ();" / & gt; View

autofixture - Class with a nested collection - how do I populate the nested class? -

I am confusing a class as a hydrates with another class nested collection. I get an error: was unable to make an example from the autofiteration system. Colllections.Generic.ilist`1 [typename ...] I to register the type for the population of the intermediate class. Have tried using registration () . Nested collection of another category (ILIIT / INInMerable) What can I do with a sample Main category I also noticed that register () has been marked as obsolete, yet on CodePlex on injection () method There is no document, so I have been stumped how it should work. Creates no guess as the instantification of the Autofiteration interface, but for you - like an integer : fixture.Register ((=) gt; fixture.CreateMany & lt; int & gt; ()); In the upcoming AutoFire 2.1 you can also do a method call with: var fixture = new fixture (). Optimize (new multiple customization ()); In relation to the boycott of the register method, please note that this i...

arrays - Variable length parameters in Objective-C -

How can I create an orbit method in Objective-C with variable length parameters? For example, such a method -ArvithAbject: NSArray * array = [NSArray arrayWithObjects: @ "1", @ "2", @ "3", Zero]; What you need is a funidious function A flexible number of these function arguments, like NSLog , [NSArray arrayWithObjects: ...] , etc. View this tutorial: My answer was copied from:

Store an image in a SQL Server CE database C# Compact framework code -

After the Hello I .. Enter the database SQL id image using my code C # Compact Framework Want fileinfofifo = new fileinfo (open fileDialog1 .filname .tating ()); Long LNGLang = 5; FileStream FSTRM = New Filestream (OpenFileDialog 1.FilenameTooling ()); BinaryReader br = new binary reader (Fstrm); Byte [] data = br.ReadBytes (int) lngLenght); String Query = "Insert In Category (cm_id, cm_intage) value (@ id, @ img)"; Sqlcecommand cmd = new sqlcecommand (query, cls.Connect ()); Cmd.parameters.add (new sqlcparameter ("@ id", (object) textbox1.text); cmd.parameters.add (new sqlcparameter ("@ id", (object) data); cmd.executenonquery (); but showing this error .... openfiledialog1, file not found .... My load image code openfiledialog Open = new opendailog (); open.filter = "image files (* JPG * bmp; |. * .jpg; * bmp, if (open.showdilog () == dialogresult.Ok) {pitcherbox1.image = new bitmap ( Open file file; fileinfo;} fileInfo Filfo ...

mysql Rand() not working -

In my case I need to first display special items, apart from that I have to choose randomly. So I have used the following query "SELECT * table_test1 WHERE id = 3 UNION (SELECT * FROM table_test1 WHERE id but this randomly my table ID name 1A2B3C4D5E It always selects CABDE Can anyone explain the principle of a union? What's wrong use In the case of ORDER from SELECT * table_test1 when the id = 3 THEN -1 ELSE RAND () END , in the quote comment, in the second statement ORDER BY Has been completely ignored. That means if you want the whole result to be sorted by a certain sequence then you need the order , which is applicable to the whole query anyway or your solution Depending on the assumptions, implementation may break into future versions.

c - finding an index i such that a[i] = i -

संभव डुप्लिकेट: आपको पूर्णांक की एक सरणी वाली सरणी और सरणी की लंबाई के साथ दिया जाता है। अब आपको एक इंडेक्स i को ढूंढना होगा जैसे कि a (i) = i । यदि मैं सूचकांक दिया जाता है तो मैं ओ (लॉगन) में ऐसा करने में सक्षम हूं, लेकिन यदि सूचकांक i का उल्लेख नहीं किया गया है तो इसके बारे में क्या? O (1) , नहीं O (लॉग एन) । और, जब तक कि कुछ ऐसी जानकारी न हो जो आप हमें नहीं बता रहे हैं, आपको उस पूर्व ज्ञान के बिना ऐसा करने के लिए O (n) समय की आवश्यकता होती है: एक्स = 0 से लेन (ए) - 1: यदि कोई [x] = x: return x स्पष्टीकरण: मूल प्रश्न यह नहीं बताता था कि सूची सॉर्ट किया गया, जिसे बाद में जोड़ा गया था। चूंकि उस प्रश्न का एक डुप्लिकेट है, आपको समाधान के लिए वहां उत्तरों पर गौर करना चाहिए। यह उत्तर छोड़ दिया जाएगा क्योंकि दूसरों के दोहरेकरण में कोई मतलब नहीं है, और यह क्रमबद्ध मामले के लिए प्रासंगिक है।

ide - Changing source files encoding in XCode 4 -

We are mainly developing in C ++ under Windows and can write comments in Russian. That's why our OEM encoding is Cyrillic (Windows). XCode 4 does not ask to specify file encoding when you add existing file to this project. And you can specify the correct encoding per file basis. How do I change the encoding for more than 200 files? Thank you. / Div> Select the files in the project navigator (one or more). In the utility pane, you can change text encoding under the Text Settings group.

firebug - Is there a way to set the Google Chrome's developer tools window to always be on top? -

What is the way to set up Google Chrome's Developer Tools window to always stay on top after Chrome separates is ? If not, is there a way to set firebug lights plug-ins for "always at the top" for Chrome? It will save the hassle of switching between windows during debugging. If you are using Windows, answer it.

App Engine: Is it possible to enqueue tasks asynchronously? -

Many of my handlers add an operation to the working queue for non-critical background processing, since this processing is not important, If the call exception to the taskqua.ed (), then my code just ignores it. The working queue was lying down for about half an hour tonight. Although my handler had ignored the failure properly, they took about 5 seconds to the taskqua.ed () column and proceed to processing the rest of the page. So my site runs very slow. So, it is possible to connect the work with asynchronous - which means that there is no way to add work, without waiting to see if it succeeded? Alternatively, is there any way to reduce that time from 1 second to 1 second? Thank you. You can create new task types of methods create_rpc and add_async You can use. If you do not care, adding is successful, just call add_async and ignore the result if you care but want to wait only 1 second, then create_rpc , and use the return value as an RPC logic on add_async ...

google maps - Jquery GoogleMaps -

Can anyone say a nice Jquery plugin by clicking and inserting the marker on the map by Jason and pointing to the point How to organize time too? Tnx got the solution: http://www.pittss.lv/jquery/gomap/examples.php Take a look at GMap. I think it can be easily adapted to add markers with one click :)

html - HTML5 block-quote with author -

Hello I'm looking at many different ways to implement blockquote in HTML but It is not clear in its documentation how should I format blockquote like a famous quote and its author: In Vijay You are a champion of alcohol, in defeat, you need it. Napoleon Bonaparte What would be the correct format in HTML5? Should the author be inside or out of the Blockquote tag? Should it be within the citation attribute? (Even for the documentation, not the author, the URI specifies) Use the example HTML 5 documentation says, "Small print generally includes disclaimers, warnings, legal restrictions or copyright. Small print is also sometimes used for use. Planting, or Licensing To satisfy the requirements. "

PHP - Send email from other domain without being spam! -

It asks for maximum and is still not a good solution! When someone sends an email using php and by entering another domain in "to" it will end in spam. The solutions are usually: - From your "to" Use and place the domain you want "to reply"; - Whitelist your domain through main mail services 1 This is not really a solution and I was never able to do another because it is impossible to reach hotmail.com, yahoo.com, etc. I still have many sites that have the option of emailing someone an email to users, how can I get this? Thx, Telemo Cardoso When someone uses php Sends an email and puts the second domain in "from", it will end in spam. This does not prove to be unsuccessful. Identify the Mail Server Also check with your hosting company for the method of your choice to send your message as spam. Try to be straightforward with your message: Provide users with a small texture (with their default masses), which they can chan...

html - Please clarify the W3C Label tag use -

The W3C specification for label tags says: LABEL element can be used P> You can use it because it is possible to attach more labels to an input. There are also considerations of accessibility, the following recommendation (mind the role attribute): & lt; Label = "userEmail" role = "alert" & gt; That email address is invalid. & Lt; / Labels & gt;

Can anyone edit the jquery localscroll plugin to give it a onAfter callback aswell as onBefore? -

LocalScroll is an on-banner option on jquery plugin that allows you to specify a function to execute before the animation But it does not have an animation after the plugin looks very easy and I'm sure it will be a 5 minute job for someone who knows what they are doing but I do not! OK you can actually put it after that it was not just a document but the functionality is

regex - python: check if IP or DNS -

How can one verify that the variable has the DNS name or IP address in the dragon? You can use the module of Python to see if the content of the variable is the IP address . For example IP address: import my_ip = "192.168.1.1" is_valid = re.match ("^ (([0-9] | [1- 9] [0-9] | 1 [0- 9] {2} | 2 [0-4] [0-9] | 25 [0-5]) \) {3} ([0-9] | [1-9] [0-9] | 1 [0-9] [2} | 2 [0-4] [0- 9] | 25 [0-5]) $ ", my_ip) if_valid: print" % S is a valid IP address "% my_ip Example for the host name: import my_hostname =" testhostname "is_valid = re.match (" ^ ([[A-zA-Z] | [a-zA-Z] [one-zA-Z0-9 \ -] * [one-zA-Z0-9])) * ([a-zA-Z ] [A-za-z] [A-Za-z0-9 \ -] * [A-Za-z0- 9]) $ ", my_hostname) if is_valid: print"% s is a valid hostname "% My_hostname

java - Problem when send a xmlHTTP request -

When I send a string with text "frà © dÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, XmlHttp for request via my server side code so I string the following text in my action = "Fred D? Rick "is for all the special characters like ü, è, à ©, ... is a strange issue, because when I do this test on my god machine it works fine and Let me text fracture. Rick when I test it on my UAT / Prod machine, then in the string "fr? D? Ric ". There is 1.5.0_17 version on JDK DEV and UAT / PROD. I have no truth at this moment ...: - ( Thank you, Prager Encoded string before sending and decoding in.

Is that kind of structure allowed in XML? -

क्या उस तरह की संरचना XML में अनुमति है? & lt; class & gt; & Lt; pattern & gt; मेरा प्रश्न & lt; / pattern & gt; & LT; टेम्पलेट & gt; कृपया & lt; सेट नाम = "यह" & gt; आपका प्रश्न & lt; / सेट & gt; दूसरा रास्ता। & Lt; / टेम्पलेट & gt; & Lt; / श्रेणी & gt; हां, यह बिल्कुल मान्य है। एक्सएमएल स्कीमा भाषा में, इसे के रूप में जाना जाता है। यह एक अच्छा विचार है या नहीं, हालांकि, यह एक और सवाल है।

Django simple-friends templte help! -

I am always trying to do this. I do not understand that there are no more guidelines in templates. My profile page requires a list of friends Something like this: {% Friendship.of friends } For% lt; Li & gt; Are_friends: {{friends.are_friends.user.username}} & lt; / Li & gt; & Lt; Li & gt; Is_invited: {{friends.is_invited}} & lt; / Li & gt; {% Endfor%} Better jing and normally new in programming It's been a bit like this that took me to work, but in the end I was there, so what did I do to sick? At first though this code may not be exactly what you want, but you will get this idea. I can make some mistakes or there is a better way to do this, so it's not right that this is the most correct way, but it works. At first I split my code into two templates when I am on my "Management Management" page, I am on another user's profile page and for one. Please keep in mind that this is basically a pure template code and no...

delphi - Could omission of "^" when accessing a record pointer's members cause an access violation? -

In VirtualTreeview, I am storing my data in PVirtualNodes . I have many in my app Access violation (usually "Read the address 00000000" ), and they mostly (I really dare to say always) when I am doing something with my node data. However, this is the thing, I used to do my stuff; Use it like this: // dummy code - IDE var MyNode: PVirtualNode; MyData: PMIDoddata; Start MyNode: = VST.GetFirst selected; If assigned (MyNode) then start MyData: = VST.GetNodeData (MyNode); If assigned (MyData) then start MyData.DummyProperty: = 'Test'; End; End; End; As you've probably seen, By MyData "dereference" (right?) Do not "MyData" Are you ^ ! The reason for this is not that I have been told that it was not necessary to add caret to the pointer, although I think there is something to do with it. If I knew, then I am not posting here. ;) So my question is, is it necessary to add this small ^ to MyData? And is it possible that by not doin...

html - How to add captions to textbox in asp.net? -

I was told that you should have captions in the input field in html. How can I do this in ASP.NET? What do you mean? & lt; ASP: Label Runat = "Server" Associated ControlIDI = "Text Conceded" Text = "Caption" /> Example & lt; Asp: label runat = "server" AssociatedControlID = "tbNum1" text = "Num1:" /> & Lt; ASP: Text Box Runat = "Server" ID = "TBNum1" />

asp.net mvc - Is it possible to get HTML content between a 'using' -

I have created a new HTML assistant with a CTOR and a disposable function, and during the start of my control, Have written HTML Like it: & lt;% use (HTML.BeginScript ()) {%> Var Jan = "Hoi"; Warning (January); & Lt;%}% & gt; Is there any way to capture the internal HTML? Textwriter does not override: public class MvcScriptWrapper: IDisposable {private readonly memorystream _ms; Private Readonly Text Worker _tw; Private Readonly Text Worker _originalTw; Public MvcScriptWrapper (HtmlHelper htmlHelper) {_ms = New MemoryStream (); _tw = new streamer (_ms); _originalTw = htmlHelper.ViewContext.Writer; HtmlHelper.ViewContext.Writer = _tw; } Public Zero Extract () {_tw.Flush (); _mssec (0, SeekOrigin.Begin); String content; (Using the streamrider sr = new streamrider (_ms)) (original .ttv (sr.ReadToEnd ());} _tw.Dispose ();}} To resolve these issues, I said that in addition to having a website written faster than its websites, edit It also supp...

c# - Fast Fourier Transform library from Exocortex.DSP -

I am trying to use FFT libraries from Exocortex.DSP. The calling function is: Exocortex.DSP.Fourier.FFT (float [], int, exocortex.DSP.Fourier Directive) To use this function, my line of code is: Fourier. FFT (Floater, Arrack, Fourier Direction. Forward); My program is compiled, but why did it break on this line? The breaker window says: An uncontrolled Exocortex.DSP.v1.dll occurred in the 'System.MissingMethodException' exception of type Additional Information: Method Not Found : Log system.Math. "* These types of errors occur when you have a code against a library Compile it, but then run against a different version or if you compile only the subset of the project of your solution, then it happens that this code tries to call those methods that are not in existence or An assembly in the assembly used in run-time The signature is not. The things I'll see are: In the Build Configuration dialogue, even if all the boxes are checked / checke...

django-forms how to get the previous values that the user has filled in respective fields -

I have a form that has my first debit field: abc LastName: def DefEfBirth: 2011-10-14. . . . Registration comes during the user and fill out this form. I have created an update link which allows the user to update their profile. I want to show that when I click on the UpdateProfile link it shows me the default password of the user who is first filled in accordance with their login password Users Should be able to see the first name as: abc lastname: def . . And so on How can I get the default value of a user according to my login and password Is this a plain form or modelform? It is very simple with the modelform. You get the object represented by the user who ModelForm prepares a form and sets an example This example is a bit crappy with user proof and you already have a user session session or whatever Maybe, but authentication is not on this. User = User. Receive (user name = username, password = password) form = UserForm (example = user)

eclipse plugin - How can I put an IEditorPart in a modal dialog? -

(I'm about an Eclipse novice, so apologize for any kind of dub ...) I have several editors ( IEditorPart ) from my RCP app, and there has been a need that a special editor should also be available in a Model dialog box (some extra Control) is an embedded editor opened by one of the other editor squares There are valid viewer controls, toolbars, and a few dozen assistant classes (label providers, comparators, etc.). Options appear in front of me: Editor area, IWorkbenchWindow -style one (JFAC or SWT) Find a way to enter in dialog> . Create a new workbench wando with a perspective, which only appears in the editor area, and no idea. P> The editor refactor in question, then all this remains in the same control, then embed this control in both the editor and the dialog. Given the number of locations, potentially time-consuming assistant class references back to the main editor object. If it turns out that it is actually a deformed a...

wpf - Separator via DataTemplate -

I have a toolbar a bound item source , I use I am setting the DataTemplateSelector at the DataTemplate runtime (i.e. button / ToggleButton ). I want to add separator DataTemplate , how do I do this? The toolbar is an item control, so it can define the items defined in item / item resources with "container" The "Wrap" wants to contain container is a UIElement that can be used to display items. For example in the case of a list box, the container is a ListBoxItem. If an item is of the appropriate type, it can also be its own container. This setup allows you to pass a list of strings to list the list, and it's properties and support selection, keyboard navigation, styling etc. In the case of the toolbar, it really expects that the item already has a container (i.e. UIElement). If the item is not UIElement, then it wraps it with ContentPresenter. Now, the Datamapplet selector is used by the container to determine how to use it. But you ne...

php search array for string, then if found, move that string to first item of array -

So assume that I have an array: $ people [0] = "Bob"; $ People [1] = "Sally"; $ People [2] = "Charlie"; $ People [3] = "Claire"; If (in_are ("Charlie", $ people)) {// take Charlie into the first item in the array} What would be the most effective way to get Charlie first item in the array? You can use elements to be included in an array. $ Pos = array_search ("Charlie", $ people); If ($ pos! == FALSE) {$ item = $ people [$ pos]; Not set ($ people [$ position]); Array_unshift ($ people, $ item); }

c++ - Unexpected results for "sizeof" of strings -

निम्नलिखित मामलों में sizeof क्यों भिन्न मान मुद्रित करें: printf ("% d ", sizeof (" ab ")); // print 3 char * t = "ab"; printf ( "% d", sizeof (टी)); // प्रिंट 4 पहले मामले में मेरे पास 2 वर्ण हैं ... sizeof प्रिंट 2 नहीं होना चाहिए? क्योंकि वे 2 बाइट हैं? सी में स्ट्रिंग्स निरर्थक समाप्त होती हैं। "ab" मेमोरी में लगता है कि 'a' 'b' '\ 0' जबकि t एक सूचक है, तो आकार 4 है।

ruby on rails - How to add a new property to an object? -

I am an object created through user models try to add a new property. A = User.find (7) I am getting: # & lt; User id: 7, Name: "Eva", email: "Stugnuz@yahoo.it", password_salt: "t4vPG0hgQVQMyIFeri6", persistence_token: "98f0cdfcb9462f3f74b1ae6ef48f0d72a015c6e04adda95fcd0 ...", login_count: 387, unsuccessful _l Login_mount: 0, current_ login_t: " 2011-03-15 08:03:54 ", Antim_ Login_t:" 2011 -03-14 23:17:45 ", current_login_ip:" 93.34.49.190 ", last_login_ip:" 93.34.38.47 ", score: 2726, level: 7, created_at: "2010-10-13 22:33:21", updated_at: "2011-03-28 13:28:40", the administrator is true, avatar_file_name: "11.jpg", avatar_file_size: 78,456, avatar_content_type : "image / jpeg", perishable_token: "PXTFtiMBxcoH3Iv7TmRh", score_this_week: 0, get_news: true, Get_notices: true, bio: "the Persian per Strada onore di Ken little Minnie anche...

c# - Combobox not visible to code behind in Silverlight -

I am trying to add items to a compoundbox but can not obtain the code behind the file to identify the combobox XAML's I am pretty sure that I am missing some simple fact, XML shows an empty boxbox here, executing the back code service, waiting for Jason to come back and make it reproduced. Unfortunately I can not find xaml: & lt; Navigation: Page x: Class = "Growing up .view room" xmlns = "http://schemas.microsoft com / winfx / 2006 / xaml / presentation" xmlns: x = "http://schemas.microsoft.com/ Winfx / 2006 / xaml "xmlns: d =" http://schemas.microsoft.com/expression/blend/ 2008 "xmlns: mc =" http://schemas.openxmlformats.org/markup-compatibility/2006 "MC: Ignorable = "d" xmlns: Navigation = "clr-namespace: System.Windows.Controls; assembly = System.Windows Designer." 950 "D: DesignHyat =" 480 "Title =" Home "style =" {Static Resources page} "Detaconteks =" {b...

Python routes non-parameter wildcards -

I am using the pylons and there is a problem with the termin '/' character, just, I want to ignore it . My path file looks like this: map.submapper (path_prefix = '/ app', with controller = 'app'): m.connect ('{_: /?}' As: , Action = 'Index') and {_: /?} instead of /? is very much like writing, since this request sets the area to do something _ , and if I redirect, then I have to set it manually how can I get it is? Thanks Instead of " {_ (/?} "or" /? ": with map.submapper (path_prefix = '/ app', controller = 'app') In the form of m: m.connect ('', action = 'index')

iphone - 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the GameView nib but the view outlet was not set -

यह अन्य समान प्रश्नों की भीड़ के समान स्थिति नहीं है। * बिना अपवाद अपवाद के कारण एटीएम को रद्द करना 'NSInternalInconsistencyException', कारण: '- [UIViewController _loadViewFromNib नामांकित: बंडल:] GameView निबेट लोड लेकिन दृश्य आउटलेट सेट नहीं किया गया था। ' आप सोच सकते हैं कि "ऐसा करें जैसा कि कहते हैं, फ़ाइल के मालिक को आईबी में देखें!" लेकिन बात यह है कि, मेरे परियोजना में या यहां तक ​​कि प्रोजेक्ट डायरेक्टरी में भी मेरे गेमव्यू। मेरे पास "GameViewController.m" और मेरी परियोजना में "GameViewController.xib" मिलान है। उस GameViewController का उपयोग करना जो इस त्रुटि को लाता है, लेकिन मुझे समझ में नहीं आ रहा है कि "GameView.xib" को आज़माकर लोड करने का विचार कब हो। इसके बजाय "GameViewController.xib" का उपयोग नहीं करना चाहिए? अगर मैं अपनी प्रोजेक्ट डायरेक्टरी को दोहराता हूं, तो मुझे "UserInterfaceState.xcuserstate" से संदर्भ मिलता है। & lt; स्ट्रिंग & gt; फ़ाइल: // स्थानीय होस्ट / उपयो...

List of Applescript terms from Xcode -

Does anyone point me in the list of xcode words that are available for use in xcode user scripts? The example starts with the script line: Using the words from the application "Xcode" - which means that there is a set of words that Are relevant to xcode. Any time you whatever Or use the words from the application, , say, look for the documents of the words that understand the SDF . / Applications / Utilities / Applescript Editor.ap will also help you with this (File> Open Dictionary).

c# - Use Prism EventAggregator like the old CAB Event system with string event names -

I always look at the prism's executor and only used with GetEvent which is very strange. I am used to the old CAB event system - I am using the intermediate implementation from Marlon Grech - where I have defined string strings, the way I make additional classes to fire / wrap my data do not require. [MediatorMessageSink (MediatorMessages.AddSchoolclass, parameter type = typef (int))] Added Public Zero Onschool Class (Int Schoolly ID) {// Work with School Class ID} How can I do this with Prismom? You can declare a single event class to use Pass all your events, and a string, because it is payload, but I actually Prism developers will not be able to confuse that attitude in this. The event aggregator uses different architecture than the old CAM. When I made the change then I was not happy about the need for an event item but I have been sold on the point of view since then - Event item is basically a liner that I generate using the Response template. The reason I like ...

css - Autoscale image in HTML table -

I am generating an HTML string for an email. I have something that looks like: & lt; Td> & Lt; Img src = 'whatever.jpg' width = '100' style = 'float: left' /> & Lt; / Td> The problem with this is that when the width is equal to the rows, then some rows are super long or super short based on the original image size. I can fit it into the 100x100 bounding box which I want to scale the image, while I tried to preserve aspect ratio: & Lt; Img src = 'whatever.jpg' width = '100' height = '100' style = 'float: left' /> & Lt; / Td> But it destroys the basic aspect ratio. I have also tried to determine the height of the TD element, but it seems that it has no effect. While generating HTML it is not really possible to load and check the image size, because I am not in control of images and they can change. OK, so you have to take back your needs in one corner. Really use an exte...

Linq to sql: Order by datetime desc, then order by the time part of the data asc? -

This is a fast SQL in Linux, I need to order a date time zone order. Then, after entering the order of time from that time of time, it comes to understanding? Here is an example of the necessary result: [serial] [date (mm-dd-yyyah: hh-mm-ss)] 1 3-13-2008: 10-10-02 2 3 -13-2008: 10-12-60 3/12/2008: 12-05-55 I tried: return query. Orderbreeding (c = & gt; c.Time). Then (C => c.Time.TimeOfDay); Also tried: query.OrderByDescending (c => c.Time). Since then (c => C.Time.Hour). Then (C => c.Time.Minute). Then (C => c.Time.Second); Any suggestions that were never seemed to work? date and timeoffs sort Properties for Return query. Orderbidescaching (C => c.Time.Date). Then (C => c.Time.TimeOfDay);

what is the best way to measure code coverage against a single spec with ruby? -

I usually do rake spec: rcov , but it's all about code coverage Measures. I would like a way to measure code coverage from a sample so that it can be ensured that the sample of each model is testing the full model rather than relying on side effects in other tests. Any thoughts? RCOV test / *. Rb I can not understand your question properly, but if you are trying to visualize just one part of your code, then it should command. I read about it here:

javascript & jQuery scope question -

मेरे पास निम्न विधि है: फ़ंक्शन मूल्य-रेंज (फ़ेस्टिवॉल) {jQuery.ajax ( {Url: '/actions/festheads.cfc?method=getPriceRangeByGUID', टाइप करें: 'पोस्ट', डेटा: 'फ़ेस्टिवालिड =' + फेस्टिवल, डेटा प्रकार: 'जेसन', सफलता: कार्य (डेटा) {console.info ("AJAX : QPrices ", data.MINPRICE); formatedPriceRange = '$' + डेटा। MINPRICE; console.info (" AJAX: formatedPriceRange ", formatedPriceRange);} // सफलता}); // AJAX; // रिटर्न formatedPriceRange; }; दूसरा console.info सही ढंग से formatedPriceRange प्रदर्शित करता है, लेकिन फ़ंक्शन के बाहर अपरिभाषित है। मैं इस चर को मूल्य सीमा फ़ंक्शन के बाहर कैसे एक्सेस कर सकता / सकती हूं? धन्यवाद आपको यह सुनिश्चित करना होगा कि मूल्य सीमा डेटा तक पहुंचने से पहले AJAX अनुरोध पूरा हो जाएगा । आपको सफलता फ़ंक्शन के दायरे के बाहर मूल्य सीमा डेटा को बेनकाब करने की आवश्यकता है। यहां आप यह कैसे कर सकते हैं: / P> फ़ंक्शन मूल्य-रेंज (फ़ेस्टिवॉल, कॉलबैक) {jQuery.ajax ({url: '/actions/fe...

php - Failed to validate oauth signature and token - Issue generating OAuth Token -

Text after " I have been looking at creating a sign on the OAuth site & Over SF, but still I make my signature I always get the same error, any idea what I'm doing wrong here error :? OAuth sign and token failed to validate I have a working app for the old rest API, so I know that my issue to my application or server etc is not lt? Php function Post_Data ($ url, $ data, $ header) {$ ch = curl_init (); Curl_setopt ($ ch, CURLOPT_URL, $ url); Curl_setopt ($ CH, CURLOPT_POST, 1); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, $ data); Curl_setopt ($ CH, CURLOPT_HTTPHEADER, $ header); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); $ Result = curl_xac ($ CH); Curl_close ($ ch); Return result; } // OAuth Token $ consumer_key = "get hidden"; $ Consumer_secret = "hidden"; $ Request_url = "http://api.twitter.com/oauth/request_token"; $ Callback = "http: //". $ _ Server ['HTTP_HOST']. $ _ Server ['PHP_SELF']; $ Non = MD5 (...