Posts

Showing posts from March, 2010

c# - changing css class from code behind variable - way to avoid? -

I need to change the background of a div based on some count property set in the back key. But I am thinking that this is a good practice if I have to change the counting logic, then I have to update the code vs. HTML. I think that jakoji can not do it until my page has a hidden variable according to the count. Is the loop better than writing logic within HTML? html & lt; Div class = "show & lt;% = CSSClass%>" & gt; Value & lt; / Div & gt; Return Behind the code public string CSSClass {(if (count> 1) return "glossy" ; And if (count == 0) "normal" return; return "dim";}} It's a good practice I have to live with it if you want to do it with jQuery, then you can expose the count server side property to the client and the same logic on the client Can be displayed though. Please, because this is done on the client because there may be some delay after the page is presented, and the jQuery code h...

Android - Activity states newbie question -

I am trying to create a quiz app in which the questions are displayed on all the same activity. Every time the screen is rotated, the method is remembered to make the method and the quiz returns to its first question, loses all the data about other questions. How can I stop it? Thank you. * ps: I do not want my application to work only on the picture or landscape mode, but on both. In your Android manifest, add to your activity: android : ConfigChanges = "orientation" Then something like this: & lt; Activity Android: name = "MyActivity" Android: configChanges = "orientation" /> This app will tell you that you want to handle the changes yourself by orientation, you can not do anything with it, or hold the related method in your app.

android - Widget becomes a different widget from another app -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं कुछ बेवकूफ कर रहा हो सकता है , लेकिन मेरे ऐप विजेट के साथ मेरे पास एक दिलचस्प समस्या है हर अब और फिर, अक्सर होमस्क्रीन में जोड़ा जाने के बाद, यह किसी दूसरे एप से एक विजेट में परिवर्तित हो जाता है यह विजेट हमेशा एक विशिष्ट फोन पर समान होता है, लेकिन फोन के बीच अलग होता है कुछ सेकंड के बाद, विजेट फिर वापस आ जाता है कि उसे कैसा दिखना चाहिए। हालांकि मेरे लिए यह कोई समस्या नहीं है क्योंकि यह केवल एक अस्थायी समस्या है, मेरे पास ऐसे उपयोगकर्ताओं की ओर से ईमेल हैं जो कहते हैं कि विजेट स्थायी रूप से दूसरे रूप में फंस गया है। नीचे कोई ऐसी फाइल है जो प्रासंगिक हो सकती है: मैं ' मैं इतने सारे लोगों को संलग्न करने के लिए खेद है लेकिन मुझे नहीं पता कि कहां से शुरू करना है मैं उम्मीद कर रहा हूं कि एपीआई के साथ किसी और परिचित व्यक्ति को समस्या तुरंत दिखाई जाएगी। मैं किसी भी खराब कोड के लिए भी माफी मांगता हूं क्योंकि यह मेरी पहली गंभीर परियोजना है और स्कूल के काम के साथ ही एक शौक है। मेरे विजेट में सटीक समान समस्या थी, जै...

android - onActivityResult for PendingIntent -

How do I get the result of the activity started with the Notification Manager? In other words, I need to get the result code from a pending identity. Public Zero Test (Reference Reference) {Notification Notification = New Notification (blank, "Text", System Quantity Time Millise ()); Intent = intent (intent.ACTION_VIEW); Intent.setData (Uri.parse ("http://www.example.com")); Pending pending vertical positioning = pending.activity (reference, 0, intent, 0); Notification.Setlat EventInfo (context, "text", "text", pending pending); Information Manager Notice (0, Notification); } I have to be notified when the browser's activity ends. OBS: This code is outside of an activity, which is why it receives the reference in the form of parameters Assume that your activity is a which is PendingIntent . This pending call activity is b . You want to get the results of B You can do this by starting proxy activity: A -> ...

c++ - How Can I Round Type Float Variable WHEN PRINTED In C Language? -

संभव डुप्लिकेट: इससे पहले कि मैं किसी भ्रम का कारण बनूं ... यह वह है जो मैं सी ++ में उपयोग कर रहा हूं cout.setf (ios :: fixed); .. cout.precision (3); .. मैंने इसे सभी प्रिंट किए गए नंबरों को सी + + में 3 दशमलव स्थानों पर गोल करने के लिए प्रयोग किया था। मैं सी में काम करने के लिए नहीं मिल सकता। कोई मदद? इसे करें: printf ("% 0.3f", myFloat);

internet explorer - jquery(document).ready() fails to run in IE 7+ -

This seems like a really simple problem for me, but despite all the possible search strings, I have no answer Found the mill I am using jquery 1.5.1 and trying to use the $ (document) .ready () function to bind many click events when the page is loaded. Eventually I narrowed down the problem: $ (document) .ready (function () (warning ('hello world');}); When I load the page in IE 6,7, and 8, I never see Hello World warnings. IE 9 works, also works as FF, Chrome, Safari etc. The 500 MS JS timelines to encircle the warning only work sometimes but definitely not consistently enough. The only possibility that I can think of is because this page is loading well inside the HTML page tag, it may be possible to get ready () function if this is the case, then I Do not know what the solution will be. UPDATE Okay, after testing a small page, I can get the document ready to work in IE (although no warning No, I think this is a completely different problem). Can you ...

apache - PHP LDAP Auto Auth -

So I have a nifty script (thanks to the help of some respondents for the last question), which one can enter Allows their username and amp; Win ED's password using LDAP While taking one step further, I would like to see if the person has already authenticated his session on the PC and used that information instead of registering new things. Someone has referred to the SSPI, which has written a small script to give me the user's name ... this is exactly what I want. The problem with the SSPI (which I can see, please correct me) is that if the person does not have a certified AD session then the browser asks for one of those traditional pop-up boxes The user who is forced to type their DOMAIN \ before the user is also. I want to go to their login form, do not use the browser pop-up. I hope for your thoughts. After answering my previous question, I thought that you would come to this point. Unfortunately, there is no transparent solution for this. I know that since ...

MySQL: display page containing record -

Assume the following records: id value ========= 1. No 2. No 3. Not 4. No 5. No 6. No 7. Yes 8. No 9. No. 10. No Every "page" of my records - Display 5 records are included (hence the page 1 has a 1-5 record, page 2 has 6-10 records, and so on ...). I want to display the page that is recorded with the value of yes . Keep in mind that I do not know that this is in the yes record. How do I ask this? about something like this: / * page Work out from * / SELECT @ MATCHID = id from tbl where value = 'yes' id to ASC limit 1; SELECT @ Page = CEIL (COUNT (*) / 5) From TBL to ID & lt; = @MatchID; / * Select the item on that page * / SET @offset = (@Page-1) * 5; SELECT * FROM tbl ORDER by IDSc border @ offset, 5; Note: The above mentioned @ ID is not completed for the ID. I am unsure whether the range of MySQL is stable, so if they do you have to calculate the offset in PHP, or whatever programming language you are using to connect to MySQL optio...

I'm building a library to interact with a public API. Should I be doing validation of the data passed or leave that to the API? -

I am creating an open source library to interact with the public API. The API validates all the data sent on it and gives a non-200 status code on failure and usually returns a failure message which causes the exception of my Library Exception. Some of my methods check the required parameters, but mostly I have decided not to validate the data before passing the API. Will a library also validate data for an API? If so, to what extent? Should all attempts to validate this data completely or simply verify that the required criteria are not empty / empty? There are two parts of the rule: on the input, become an approved grandmother: what does the caller take you and Be not careful about the interface conference at those places where this little difference comes; Or where you can supply appropriate defaults, on the production, follow this letter to the conference: a hardened pedal, a martinet. So, in my opinion, the answer is yes, you should check the input of your caller an...

jquery - fullcallendar and qTip very slow -

I have a full calendar page that I am using qTip (v2). The problem is that the qTip tip is really slow and sometimes appears to get mouseover events so that I have to mouse over again and then it will be a fire. I have an Ajax call, which I thought it could be slow, but when I removed the AJAX call, there was no difference. The code below is eventmouseover from fullcalendar. I did not include all the calendar code because I do not believe this is a problem. eventMouseover: function (calEvent) {// start mouseOver if (typeof calEvent.TeamDetailID! = 'Undefined') {// start undefined $ (this) .qtip ({content: {title : {Text: calEvent.title}, text: 'Loading ...', Ajax: {url: '/inc/_runcfc.cfm', type: 'post', data: {cfc: 'display', CfcMethod: 'TeamDetail_popUpDetail', TeamDetailID: calEvent.TeamDetailID}, success: function (data, position) {this.set ('content.text', data);}}}, show: {delay: 0}}); // (this) .qtip} // end if unde...

c# - Lisp syntax highlighting for ICSharpCode.TextEditor -

Is there a general Lisp syntax highlighting .xshd file for the use of ICSharpCode.TextEditor? I can not find one on Google, and the format of writing specifications files highlighting syntax is so badly documented that I can not do very well myself Common Lisp Keyword Highlight, like list , dogist , read-line . Lambda , etc. defun , defmacro , defvar after highlighting syntax for words, etc., such as text ( Defun a () ...) , a is highlighted. It should not be complete because I can add more, it shows how it is done, just one or two is fine. Like such as: Li> cited lists (" , , @, , Etc.) highlight the quoted lists within the quoted lists " Highlighting the name of a function, for example, text (abc) , a needs to be highlighted Optional: Anything that is remembered will be useful (i Do anyone know that ICSHRCPDitech Common lis for Where should the syntax highlighting file be found, in which are these features? Here is a start for a...

Silverlight combobox acting like menu -

I want to modify the Silverlight cobobox behavior. I want to open the dropdown by entering the combobox but do not want to click, when the mouseenter is easy to handle events and to do this when opening an asset to correct the idropdown. But the problem leaves dropdown area and combo when the dropdown is to be closed. Any suggestions. Thank you. I recommend that you use the extension from Silverlight Toolkit to Item Component Video:

ruby on rails 3 - Requesting header information of a file -

Anyway, I can only request header information for any media. For example, Header should request the information so that its video length can be found. I tried to use ffmpeg -i {video_url} and I did this but I found out that it actually downloads the given media in local storage and returns the header information Which clearly enhances roundtrip time. So I really appreciate if there is any idea to find the length of the media in a fly. BTWW, I have Ruby on Rail application where I have to implement it. You can ffprobe -show_format . Ffprobe comes with FFmpeg, and should have been compiled and installed with it.

android - application fails when more than one activity calls startActivityForResult -

I have 2 activities that call a third activity using startActivityForResult but after the third activity is over, Failure fails before it When I initially used to call only 1 activity, it used to work fine and if I use debugger, it means that it usually does not make sense. Activity A :: button1.setOnClickListener (New View. OnClickListener) {Public Zero onClick (see v) {intent = new intent as my code This is as follows: Intent.setClass (ActivityA.this, AddActivity.class); startActivityForResult (intent, ADD_CATEGORY);}}); Protected Zero on the Active Result (int request code, Inc. result, code, intent data) {super.onActivityResult (requestCode, resultCode, data); If (requestCode == ADD_CATEGORY & amp; amp; resultCode == RESULT_OK) {if (data.getCharSequenceExtra ("added") = null!) {String category = data.getCharSequenceExtra ("added") toString (). CategoryList.add (category); }}} Activity B: button.setOnClickListener (New View. OnClickListener) {P...

c# - is there a way asp.net to trigger whether to display a fieldset? -

I am creating a program with an ASP.NET C #, I am using several gridviews to show different criteria of data on page 1, each of these criteria is a title, Now, if there is no data of a Gridview, which will not display it, even though Gridview's title will still be because it is purely HTML field and legend. Is there any work that I can use to trigger the visibility of the title from the C # code? Thanks (Screenshots below) "Https://i.stack.imgur.com/hnIkb.jpg" alt = "Enter image details here"> You can add runat = "server" to the field as normal And can set visible = true or false (of course you also need to set an ID).

regex to check for a valid regex pattern in php -

I am trying to write a verification class in php and have a snag. I am using the following code to check a value against a defined regex pattern, but when I try to run the script I get an error message: "Warning: preg_match ( ) [Function.preg-match]: Can anybody face my mistake? Public function is_regex ( $ Var, $ {$ Valid = (bool) preg_match ($ expression, $ var); if ($ valid == incorrect) {return $ $ {$ ($ trim ($ var) Msg}}}} and I am using it to call the function array ('type' = & gt; 'Regex', 'Var' = & gt; $ _ POST [ 'Test'], 'expression' => [[AZA-Z] {1,20} $ ',' message '= & gt;' expression does not match ') As far as I see, you must include regexp in attachment characters, for example. Array array ('type' = & gt; 'Regex', 'Var' = & gt; $ _ POST ['test'], 'expression' = & gt; | [A-Za-z] {1,20} $ | ',' Message '=...

java - JAXB: How to avoid repeated namespace definition for xmlns:xsi -

I have a JAXB setup, where I change the object type Person with the object Using an @ XmlJavaTypeAdapter, type is the only UUD of that person in type PersonRef . Although it works perfectly well, however, the generated XML uses the same name space ( xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" / Code>), although it is usually okay, it does not look right. How can I configure JAXB to declare xmlns: xs in the initial time of the document? Can I manually add namespace announcements to the original element? Here is an example that I would like to receive: Current: & lt; Person uuid = "6ec0cf24-e880-431b-ada0-a5835e2a565a" & gt; & Lt; Relationship type = "child" & gt; & Lt; To xsi: type = "personRef" uuid = "56a930c0-549 9-467f-8263-c2a9f9ecc5a0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema -instance" /> & Lt; / Relation & gt; & Lt; Relationship type = "chi...

jquery - SimpleModal modal contents does not appear once closed and then reopened -

There is a problem with my simple model, that is, once it is closed and again gets over again, the contents modal You can take a look at nitinkabra.com/baldevgroup/contact.html, contact us button at the bottom of the page. I think that whenever you open, you have to reload your cofon. Cufon.replace ('h1, h2', {fontFamily: 'stack overflow'}); Cufon.replace ('h3', {fontFamily: 'stack overflow light'});

java - Getting the current time and date on a 24 hour timescale -

I am currently having problems in 24 hours of time, as far as I know, "HH "The present time of 24 hours should be shown, however, for some reason," HH "is not exactly interpreted. This is the reason that in the following line of code, " HH: 50: 06 ul, 02. Sep. " : DateFormat.format ("HH: mm: ss 'ur', dd.mmm", new date ()); Any thoughts that I am doing wrong? Using "Hh" work, however, it will produce time on a 12 hour scale, which is what I do not want to do. Appreciate the Help! You can use it to format the way you like it: Works: SimpleDateFormat sdf = new SimpleDateFormat ("HH: mm: ss"); String str = sdf.format (new date ()); In addition to this.

c# - Get total from SqlDataSource -

I have a gridview that is bound to a data source, sometimes a few thousand lines. In order to avoid such a huge grid, the results have been salvaged. I need to get the total number of some decimal columns - I currently do a different query which is quite a size data source Is there any way that I can go through all the rows in the data source, and I can get the total? I used to do it by counting onRowDataBound, but it is no longer an option because of paging. ah example: Generally the UI should not be counted but "x over the rows" Example: Load 501 rows Cut a line Say the result in more than 500 rows Finish. This works the most active intersection, which includes all active directory mangement.

jquery - how to refresh same url image and also preserve caching? -

I have found that most of the solutions to download the image every time after the image link "? + Time ( ) ", However Can ifModified help in AZAX? Any suggestions are welcome, this is not an ideal solution. Thanks! Edit: Is there any way in the ink without involving "? + ..."? And consider that the image may be a remote resource. Ideal that you attach file revision time (on server) or ** PHP file time () ** Timestamp This way, when you change the image on the server, the timestamp changes and the new version of the image gets all users immediately (at the next load). But you must use it in the server side language, such as PHP for more information Google "filemtime ()". Representative xample: & lt; Img src = "image.png?"? Lt; php echo filemtime ('image.png');> "/ & gt; or: You can do this for yourself Function can also write: function image ($ file) {return $ file. '?'. F...

Convert date into minutes in JavaScript -

I want to compare two dates which are big in those dates. var date1 = 2011-9-2; Var date1 = 2011-17-06; Can someone say how can I do this? You will first need to change the stars in both stars. var date1 = new date ('2011-09-02'); // yyyy-mm-dd format var date2 = new date ('2011-06-17'); If (date1 & date; date2) {warning ('date1 is greater than date 2'); } Once you see 2 objects in the form of a date object, you can compare them against each other (without the need to convert to milliseconds / minute /?)

asp.net - Multiple domains, same application but different result on each subdomain. how to keep track of which account for the subdomain? -

I have a web application where users can register, each user will get a subdomain in their account and each subdomain will be unique But use the same web application as every one. This application is .net and I run it on iis 2003 or 2008 (it is not yet valid) and I'm targeting (1000 subdomains) for approximately 1000 users For example: user1.mydomain.com user2.mydomain.com user3.mydomain.com alias sub.something.com domain aliases Due to getting an account id in subdomain name is not always possible. So I was thinking about various methods 1: There is a database lookup display for each page request and the account ID is back. Drawbacks? Additional database communication and table and e-text search for all users with all domain names are not always good ideas in the database every time a page is requested. 2: Session as the number 1, but the account is saved as the account ID. But what happens with 1 thousend accounts, and each account has 1000 viewers, large amount...

javascript - how to get selected items id in jquery selectables? -

This could be a simple question, but I could not find the solution. I stick to get the selected list item ID in this jquery selectables.my list such as & lt; Ol id = "selectable" & gt; & Lt; Li id = "one" & gt; & Lt; Div & gt; A & lt; / Div & gt; & Lt; Div & gt; Two & lt; / Div & gt; & Lt; Div & gt; Three & lt; / Div & gt; & Lt; / Li & gt; & Lt; Li id = "two" & gt; & Lt; Div & gt; A & lt; / Div & gt; & Lt; Div & gt; Two & lt; / Div & gt; & Lt; Div & gt; Three & lt; / Div & gt; & Lt; / Li & gt; & Lt; / Ol & gt; My jquery code is such as $ ("#selectable"). Selection ({filter: 'li'}); Now what I want is selected.It is getting the ID of the ID: If I select first on Li, then I need its ID. Thanks for any help. You can: $ ("#selected" ). Selection ({Selected: Function (...

java - jsoup: removing iframe tags -

I am using jsoup 1.6.1 and am encountering a problem when I remove the iframe tag from html I try. When the iframe does not have any body (i.e string html = "& amp; amp; amp; l> gt; it's the beginning. & Amp; lf; lt; / p & gt; & amp; amp; lf; iframe frameborder = "0" marginheight = "0" /> & amp; lt; p & gt; this is the end & amp; lt; / p & gt; "; Document doctor = jesop.prepress (html, "utf-8"); & Lt; Br> Remove doc.select ("iframe"); & Lt; Br> Println (doc.text ()); It comes back to me - is the beginning but I expect the result - This is the beginning It is the end Thank you in advance This closing appears to be an tag for Iframe You can not use the closing tag yourself: http://stackoverflow.com/questions/923328/line- After-iframe-is-not-visible So, Jesup is following the fiction and whatever follows the iframe tag and its shit Uses as and when you r...

flash - AS3 How to check if BitmapData is empty -

I have a code to erase the masked movie clip (credit) I would like to know how I can see that the whole movie Whether the clip has been erased or not. So I thought I have to check whether the bitmapdata is empty, but I can be very wrong! How can I check that every pixel of the movie clip has been erased? Of course my example below is wrong, but I think that something like this should happen. if (imaging bitmapdata = empty) {trace ("empty")} var lineSize: number = 40; Var doDraw: boolean = false; Var resume drawing: boolean = false; Var irrelevant bitmap data: bitmapdata = new bitmap data (700, 500, true, 0xFFFFFFFF); Var irrelevant bitmap: bitmap = new bitmap (ereaselbitcapadata); ErasableBitmap.cacheAsBitmap = True; AddChild (erasableBitmap); Maskee.cacheAsBitmap = True; Maski.mask = erasablebitmap; Var Eraserclip: Sprite = New Sprite (); InitEraser (); Function Init Eraser (): Zero {eraserClip.graphics.lineStyle (Linesis, 0xff0000); Eraserclip.graphics.moveTo (...

dependencies - How do I reference play framework third party modules without referencing an absolute path? -

This is my position I have a play app that uses to work with the navigation module: I've installed it using the install button . It does this in the $ PLAY_HOME / module which is fine by me, I do not want to edit the module files in any way. Then I announced the module in my dependencies.yml : - play -> Guice 1.2 Within my app, I used to run playback dependency , and this module runs properly and has a modules / guice-1.2 file that references the navigation module. The problem is that the content of that file is something like the following: /some-absolute-path/play-1.2.x/ module / guide-1.2 . This works fine when working locally for development. But when I want to go to a production server with a different play! So what's the best way to deal with this? For now, I have resorted to declaring the module in the application.conf file like this: module.guice = $ {play.path} /modules/guice-1.2 . Unfortunately, $ {play.path} magic does not work ...

problem to make scroll able,set scroll for whole layout android -

To display more information in the list view, make the layout to show the content in the list view and in the list view below. I was just showing 4 lines in the list view and the next time I click on the button then 4 rows are added to the list again, so now my button goes down on the screen so that how to create a full layout scroll So i'm up Can scroll to the layout and go to the button. the listplacehold.xml is & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RelativeLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" android: orientation = "vertical" android: Layout_width = "Fill_parent" Android: Layout_height = "Fill_parent" android: background = "# 1 A77 BD "& gt; & Lt; Android: layout_height = "wrap_content" android: layout_weight = "1" android: drawSelectorOnTop = "false" /> & Lt; Android: id = "@ + id / hor...

visual studio 2008 - Clone One Project from Solution -

I'm working with Visual Studio and working with the plugin, I have a solution with many projects in source control . My problem is that I just need to clone a project because I need to do personalization for this client. Is there any way I can do that? Thanks in advance for help. No, you can not just clone a directory from a mercurial repository ??? You must always clone the entire repository, so you should make sure that the 1 mapping of 1/1 should be between the repositories and the projects. FYI, such a clone will be called and it is not yet supported.

objective c - char array to [NSString stringWithFormat:] -

This code contains code (MD5 hashing) four unsigned char [16 ]; // Filling result with data [NSString stringWithFormat: @ "% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x% 02x", Results [0] ] Results [2], Results [2], Results [4], Results [5], Results [5], Results [5], Results [6], Results [7], Results [8], Results [9] , The result [10], the result [11], the result [12], the result [13], the result [14], the result [15]]; Is this code pushing the entire array in NSString? is the fastest way to hexize 16 characters in an NSString . If you do this often, wrap it in the function so that you have a copy of the code. :)

c - Proper use of malloc -

One chapter from the book I read is focused on the allocated memory management space using Malok Linux Functions. Before I read it, I will make relatively small programs without the allocation of space. Is it not acceptable to do anything in the manner of allocation for memory, whose memory footprint is below 50 MB? What are the consequences of doing this? If you can do without malloc for small applications, maybe using the location of any stack There is no need to. Little utility programs or toy programs often do not. Whatever you want to use the heap, however, may be wrong to get by: Arrays If you allocate large arrays to yourself, then this To make sure that everything is all right ', then you should probably use Maulok at least, to handle the situation of error, to check that they are actually very big. With dynamically allocated arrays, if you find that you need more space, then you can do a large number of flights. Too much recursion is sometimes the adva...

xcode - WebView load HTML page with all resources from a local directory -

I am developing a cocoa application. This is a requirement of application to load HTML pages from a local directory. The HTML page includes many resources such as links, images, JavaScript, XML and CSS files. So it is more like a local website without any server. How can I get it using WebView control? I am developing an application for Mac OS X. Any help would be highly appreciated, Farooq - You can use - [[yourweebview mainframe] loadRequest: [NSRR request request with url: [NSUr URLWithString: pathOfLocalWebPage]]]; Hope this helps :)

iphone - Send updated version of my Enterprise App? How? -

I created an enterprise app and now I have an update coming for this app. Now, how can I install this app to my customers? I read it, but I want to make sure that it works and I need to know that I need to take any precautions or do anything before sending the update app to my customers. Anyone who has done this or has any idea about this, please help me! If a person updates the application, then its document folder is in that form So be sure that the existing data are not affecting your new version and if you want to retain some old data then keep the same bundle identifier and ask the user not to delete the application. This is a local server setup, then install the old version, then update it with the new version and test it again. The installation of the local web server will not be more than 20 minutes ..... Hope this is useful ....

javascript - Click on different transparent PNG's. Which one is clicked? -

I am trying to prepare a map of the country, which is divided into different provinces. When my products are available in some provinces, these provinces will get light on the map. I want people to select a province and click on it. I am thinking of doing this: 1) I have the background of whole country in dark colors 2) Every province is a different transparent PNG in a light color 3) When my database is a product address This background image will show a light color image of each province The problem is: I want a light color clickable image, but the canvas of all the images will overlap. Is there any way to accomplish this ? It should work in all major browsers, and preferably not with the image map. I want to link the clickable area to the non-transparent part of the PNG image. I hope this will understand a little bit, thanks a lot in advance. An option has just created your world image, and another Hittest image, where all the states are a different color when th...

java - setting multiple highlighters to a jeditorpane -

I want to know that we can set the two highlighter of JEditorpane to sethighlighter (New Highlighter ()) Method where there is a default Highlighter and the other is a highlighted Highlighter You can use a highlighter but can add highlights with another highlength operator underline. Public Object addHighlight (int p0, int p1, Highlighter P) throws BadLocationException;

c# - MVC3 WebGrid column definition problem -

One of my views is WebGrid, in one of the columns I want to show an image if the user is the leader. What I'm doing so far, I do not work at the moment. Anyone know how I can do this? The code of my problem: grid.Column ("FullName", header: "name", format: (item) = & gt; (item.IsLeader ( )))? @ & Lt; Text & gt; & Lt; Img src = "@ Url.Content (" ~ / content / images / leader.GIF ")" alt = "" /> & Lt; / Text & gt; : Html.ActionLink (string) item I'm getting an overload error Hope everyone can see that the full name, "index", "organization", new {domain = "catalog"}, tap), What i want to do here (New to razor and webgrid) try it Func & lt; Dynamic, object & gt; Format = @ & lt; Text & gt; @ {If (item.IsLeader ()) {& lt; Img src = "@ Url.Content (" ~ / content / images / leader.gif ")" alt = "" /> } And {...

xcode - Simulator is so slow, but not when running with allocations? -

Actually I do not know what's going on, explain Ill. First I have xcode 3.2.5, I have never managed to create allocation tools and the console is working, I still think that this is not correct ... Anyway, when I run the app ... at its very slow ... I find the console of inquiry but everything seems normal for him ... except it is 20 times slow. When I run with the allocation, nothing appears in the console ... but it runs at normal speed ... does anyone know what's going on? Thank you in advance for your time! When you run the app with playing, the app is actually Compare the normal performance that will run slower in. No logs will be printed on the console

wpf - TreeViewItem with Databinding, Childs doesn't update -

I've found a previewview with a historical template. Everything works well, will answer as expected all objets, but adding the element to the collection does not update the tree view. My base object is added to the previewview. It has a collection of assets and this collection has got a property with its collection. BaseBeckt - & gt; Sub collection 1 - & gt; Sub-compilation 2 My base object has changed the inautifprotype and my subcolation 2 has modified the iSCLoption. However, Ihen is asked to add a new item SubCollection 2 to OnCollectionChaged, but if CollectionChanged remains zero, nothing happens. TreeView Template: & lt; HierarchicalDataTemplate x: Key = "SheetTreeTemplate" & gt; & Lt; StackPanel Orientation = "Horizontal" & gt; & Lt; Image width = "16" height = "16" margin = "3,0" source = "/ resource / symbol / page_green" /> & lt; TextBlock FontStyle = "I...

Language Switching doesn't occur if url is entered in French having English store currently - in magento -

I have trouble stating that my current store is English & amp; I am on the category page but the point is, if I write the URL category of the IMO in the French version, then it does not give any error on the 404 page. Ex (from French to French scene) - These are Dummy URLs, so do not click to see! The other thing is that when I put the French URL then the whole site should be converted to French view. Any help? Please Let me suggest you to recreate the indexes if Everything is set up properly, so it's a cache and old indexed problem

caching - Invalidate a specific model in the Rails cache -

I'm using Rail 3 with Memcached to cache some models. When the model changes, I want to invalidate the cache for that record. With pieces of the scene, I just say expire_fragment ("blah") . How can I do this with my model? I do not want to say rings.cache.clear and I lose everything. I need something like rails.cache.invalidate ("/ users / 5") . How do i do this You did not mention that the model has actually been added to the cache. You can invalidate the model cache using the after_save hook. class models & lt; After AR: Base: Sacrifice invalid invalid services Private invalid rails.cache.delete ("/ user / # {self.id}") End and

jquery - hiding a previous input button -

I have a php code that executes a loop in which it creates the following: echo "& lt; input type = \" button \ "event = '$ eventID' id = \" sendsomeone \ "value = \" send a family member \ "/ & gt;"; Echo "& lt; span id = '$ eventID' & gt; & lt; / span & gt;"; Later, I have JavaScript that is low: $ ('Input: Button'). Click (function () {$ (this) .next ("span") attachment ('you clicked this button!');} This code works fine But I want to hide this button too ( $ (this) .Parent ("Input"). Hide (); and $ (this) .prev ("Input"). Hide (); But I can not understand how to work it. It looks like you already have the $ ('input: button') button selector, so do you do it Have tried? $ (this) .hide ();

Mysql limit rows per group weird results -

I wanted to get the latest 4 dates for each symbolid . I've optimized the code as follows: set @num: = 0, @symbolid: = ''; Row_number as symbolid, date, @num: = if (@symbolid = symbolid, @num + 1, 1), @symbolid: = symbolid From the processing group as symbols of the Dame, having the date row_number & lt ; 5 and get the following results: symbolic date line_Number Dummy 1 '2011-09-01 00:00:00' 1 ​​1 1 '2011 -08-31 00:00:00' 3 1 1 '2011-08-30 00:00:00' 5 1 2 '2011-09-01 00:00:00' 1 ​​2 2 '2011-08- 31 00: 00: 00 '3 2 2' 2011-08-30 00:00:00 '5 2 3' 2011-09-01 00:00:00 '1 3 3' 2011-08-31 00:00: 00 '3 3 3' 2011-08-30 00:00:00 '5 3 4' 2011-09-01 00:00:00 '1 4 ... The obvious question is, why did I get only 3 rows per code , and why were they counted 1,3,5 numbers? Some details: I tried to force both of them to an index and not (as seen here), and the same result was found in bot...

ruby on rails - How to query to get all users based on a nested resource? -

given: room (id, update_at) roommember (room_id, user_id) user (Id) How can I get all the users of the last updated all rooms in the last 24 hours in the train? Thanks Selection ('Specific User. *') Joins (: rooms) .where ('rooms.updated_at & gt ;?', 1.day.ago)

How parametrize generic singleton in java -

I have the next problem I have an interface: public interface worker & lt ; T & gt; {Public Zero Start (class increases the tenure); } and the implementation of the singleton of this interface: public final category listener & lt; T increases the runner & gt; Worker & lt; T & gt; {Private listener () {} @ Override public vowstart (class increases the term) {...} Public stable listener getInstance () {Return Singleton Holder. INSTANCE; } Private Static Class Singleton Holder {Public stable final listener INSTANCE = new listener (); }} My question is, can I get a singleton example like this: worker & lt; Thread & gt; Audience = Lister Gate instance (); Still the type is safe? When not, how can I use type-safe in the Common Type Singleton instance? All generics are snatched on runtime. This means that you are going to be just a stable class singletonhold and only one INSTANCE , whatever is normal. To get this past, if you...

Identifying clients in a WCF service -

मेरे पास एक कार्यशील डुप्लेक्स WCF सेवा है WSDualHttpBinding के साथ। मेरी समस्या एक अद्वितीय आईडी के साथ कॉलबैक चैनल को स्टोर करने का एक तरीका ढूँढ़ रही है I सेवा का उद्देश्य लंबे समय से चलने वाला है क्या मैं बस ऑपरेशनकॉन्टेक्स्ट। कंटेंट। गेटकॉल्बैक चैनल () रिटर्न मान को प्राप्त कर सकता हूँ जब "सदस्यता लें" विधि को एक सूची या शब्दकोश में संग्रहीत किया जाता है? क्या कनेक्शन की ज़िंदगी तक वैध होने की गारंटी है? ग्राहक के पास सबसे आसान तरीका होगा अपनी सेवा की सदस्यता पद्धति में एक महत्वपूर्ण मूल्य प्रस्तुत करें। फिर आप एक शब्दकोश में कॉलबैक चैनल को सहेज सकते हैं इस शब्दकोश को शायद एक स्थिर वैरिएबल या सिंगलटन क्लास होना चाहिए, जिसका जीवन काल सेवा वर्ग की उम्र से अधिक है क्योंकि अधिकांश सेवा वर्ग के पास प्रति जीवनकाल रहता है और सर्विस कॉल पूरा होने के बाद इसका निपटान होता है। थ्रेडिंग के मुद्दों से सावधान रहें! कॉलबैक चैनल किसी भी समय क्लाइंट या सेवा पक्ष पर दोषपूर्ण हो सकता है। सेवा को दोषपूर्ण चैनल की संभावना को संभालना होगा और दोषपूर्ण चैनल को शब्दकोश से निकालना ...

web applications - website structure - javascript/jquery platform with hash navigation -

I try to find a good and decent structure for the website with a clean javascript / jquery front-end and hash navigation I am here. Like the famous Facebook ... Commonly used & lt; A href = "# the_page" & gt; & Lt; / A & gt; The best way to link from page to page with or is there a suitable solution for these "new" websites? I think I need some type of on-hash-change so that users typed addresses will be impacted on the website .. I have used this kind of website stacker So any good advice and practices are very welcome :) For this type of thing Is a lifefirst, how to use it as an example, as you scroll down the page Es. Hope that helps!

ios - Xcode: Can you change views if your project isn't a View Controller project? -

I want to change ideas eg; [Example current model view controller: Example 2 Animated: Yes]; But can I do this in a single visual application? A silly question may sound, but is there a way or something similar? thanks, James A new UIViewController Add sub-classes and use: targetView = [[& lt; & Gt; Alloc] initWithNibName: zero bundle: zero]; [Self-current model visualizer: Targeted animated: (yes)]; [release the target view]; In the headline: @class add & lt; & Gt; Take care of variable declaration + gates / sets; Will this work for you? I did not know there was something like "single-sight app" ...

wordpress - Monitoring Hosting Performance -

I am creating a site, running Wordpress 3.2.1 and found that the display is in front and rear end Is dull I believe the problem is getting specific. The problem is loading the actual HTML which is taking approximately 5.5 seconds. It ends after about 500 mms, but loading for 3-4 seconds does not stop. There is a development URL: Hosting: Windows NT PHP version 5.2.10 There are some jquery selection boxes that are replaced and styled onload ( In the footer), it takes more time to replace these pages after they are completely loaded. The host's claim is going on well. Is anything I am trying and can see what is going on? Or any suggestions? Thank you. Roughly extrinsic reason, try it will identify several things You can work on it, it will not tell you anything about the internal behavior of your server, but it can help you reduce it.

c# 4.0 - Accessing Ribbon Controls Programatically in an XML Ribbon -

Using Programming Office Add-Ins C # 4.0, two different ways to create and / or modify the Microsoft Ribbon interface Provides ways: You can use or define the layout of the ribbon If you create a ribbon using the ribbon designer, then the code generated in the back code is placed on your ribbon Visibility of all controls is visible. So if I put a ribbon dropdown named "Dropdown 1", then I can use the following code to add an item to it: ribbon dopdoin item item = factory.createbrubbdowndown item () ; Item.Label = submatrix.Name; Item.Tag = submatrix; This.dropDown1.Items.Add (item); However, if you create the same ribbon using the ribbon XML, dropdown 1 or factory ("the name does not exist in the current context"). What is a way to access items added in a ribbon XML-defined ribbon in the code? It may be a while, but hopefully it helps someone. I was totally confused about this same issue. Exits, you can access these controls only as string IDs, ...

android - Manually Handle MP3 Download in WebView -

I have a snippet of code in which I want to handle the download of the file being clicked: else if (url.startsWith ("http://rapahh.com/songs2/Music%20Promotion/Download/")) {} return false; Although I do not know how to handle downloads in Android, so anyone has a snippet code, I can use the file to download in a folder in the background Am .. download folder is ok Thank you. What version of Android are you making? The API Lvl 9 is there which can handle it for you. If possible, you should use DownloadManager because it will automatically handle network interception and resume downloads for you. If you are aiming for less API lvl, then you have to make the download code yourself. You will have an input stream from your web source and an outputstream is going to your local file and you will not have to leave any one until the loop through the interstitial writing section. Something like this: try {url = url = new URL (URL); // Video URL // Set our file to...

css - creating table change colums's background color -

I want to change the background color when COLUMN Javascript is required for mouseover? My Table: & lt; Table width = "100%" range = "0" cells = "1" cellpadding = "1" & gt; & Lt; TR & gt; & Lt; Width = "169" radius = "colonel" & gt; A ° SIM & lt; / Th & gt; & Lt; Th width = "380" radius = "colonel" & gt; AÃ§Ä ± klama & lt; / Th & gt; & Lt; Width = "138" radius = "cola" & gt; Telephone Numerous ± & lt; / Th & gt; & Lt; Width = "158" scope = "colonel" & gt; Ä ° l & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt ;? = $ Data ['u_isim'] & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt ;? = $ Data ['u_aciklama'] & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt ;? = $ Data ['u_tel'] & gt; & Lt; ...

xcode4 - Objective C custom class/view -

I have around 17 views to create custom navigation footers for every 3 buttons, customizing each button No standard, no Wii can do this, as I did with IB etc., but what I would really like to do to know more. It will have a custom class / view, which will include only my footer navigation, so I can call it to save time for saving it from IB in each scene. I did it before, but I got a first post having problems with a dynamically created button, so my question is, what is the best way to make it, through class or I I can only do this in IB and then import it on every watch / page. In the footer, a BTN item of BTN BTN and A, the next BTN, if I can do this to be able to import it, then I will pass two wards so that the previous and next buttons will know that Which pages do they go to? Any link to create / view custom class Anytime you get a assembly UI You are using more of the objects, making a nib (or exting or whatever you are calling these days) is definitely the way to...

iOS Image rotates on button press -

I am downloading some images from the API for my iOS app and then displaying images as buttons background I am here. Here's the code: NSData * imageData = [r feedbackdata]; UIImage * image = [UIImage imageWithData: imageData]; UIBlockButton * imageView = [UIBlocktonTypeCustom] with UIBlockButton Button; [ImageView setBackground Image: Image forState: UIControlStateNormal]; Here's the weird part. When I press the button, the vertical diagram (length is less than the height) will rotate 90 degrees. Has anyone experienced this before / is it a bug? Edit: So my server sends images in rotated states. Either way UIButton knows it by rotating when it is not selected, but when I select it, it does not do the same improvement. add [imageView setBackgroundImage: image forState: UIControlStateHighlighted]; Unless, of course, you prefer another image for the highlighted state, which imitates the actual pressure, in which case you will use another image instead of ...

big o - Writing a test program to evaluate the computational complexity(Big O) -

I used to work with the problem of writing a test program to evaluate the computational complexity of the following problem (Big O) And actually A nested loop where eaach loop n times runs This is what I generate Was able to for (int i = 0; i & lt; n; i ++) {// do stuff} Now write the exam program. Can somebody help me out? As you have described, the complexity of the separation seems to be (N ^ 2) this "experimental" It may be possible to try to evaluate: just run algie with different values ​​and take time to calculate. Then plot the n values ​​on the time values ​​on the x-axis and y axis of a graph. Now you should make some guesses with Parabola.

php - Regex matching table rows in HTML -

संभव डुप्लिकेट: मुझे प्राथमिकताओं के साथ तालिका पंक्तियों में एक समस्या का सामना करना पड़ रहा है यहां मेरी अभिव्यक्ति है: & lt; tr [az \ = \ "a-z0- 9] * & gt; ([\ {\} \ (\) \ ^ \ = \ $ \ & amp; \ \ _ \% \ # \ \ @ \ = \ & LT; \ & gt; \:।!? \; \, \ ~ \ `\ '\ * \ \ / \ + \ | \ [\] \ | \ -एक-zA-Z0-9à ?? - ÿ \ n \ r] *) के & lt; \ / टीआर & gt; आप देख सकते हैं, यह सब कुछ मच करने के लिए कोशिश करता है in- टीआर टैग (सभी प्रतीकों सहित) के बीच यह हिस्सा महान काम करता है, हालांकि कई तालिका पंक्तियों के साथ व्यवहार करते समय, अक्सर प्रत्येक तालिका पंक्ति के लिए एक मैच के बजाय एक तालिका के रूप में एकाधिक तालिका पंक्तियां लेती हैं: & lt; टीआर & gt; & lt; टीडी & gt; परीक्षण & lt; / टीडी & gt; & lt; / टीआर & gt; & lt; टीआर & gt; & lt; टीडी & gt; test2 & lt; / टीडी & gt; & lt; / टीआर & gt; पैदावार: सरणी ([0] = & gt; & lt; टीडी & gt; परीक्षण & lt; / टीडी & gt;...

c# - Problem With Export Button in Report Viewer 2010 Localization -

I transfer report viewer 2010 through implementing this interface: IReportViewerMessages, IReportViewerMessages2, IReportViewerMessages3 Everything is fine and my wish label appears in the report viewer. But when I open the export list, there are no items in it. thanks Well, clearly you have not localized every single string and you still have to add some missing localization. If you have a neutral resource file then you can compare it with those interface implementations and see if there is a mistake key / string. / div>

gwt - How to formulate a JSONP request -

I am in the process of learning about GWT, I am currently experiencing problems in making an RPC call on a specific server using JSONP. . The server wants to communicate with the Jason-RPC service for which {'content-type': 'application / JS'} , and for example: { "Params": ["hollosver"], "method": "server.greeting", "id": 10} . I wonder if it is possible to request JSONP on this server, because I think that JSONP is the only only solution, similar to Origin Policy restrictions of GWT. Edit : As mentioned, I think I have to be on JSON because the server does not provide JSONP service suggesting that the solution of SOP is correct It has also been suggested. I wonder if it is possible to request a JSONP on this server If the server does not support it, then no. To support JSONP server response is required: ": 10}) Where some callback is the name of a function that can be specified by the cl...

multithreading - Android: Running thread preventing animation from starting -

I currently have an Android activity that manages RSS feed stored locally. In this activity, these feeds are updated in their thread through a private class. I am also trying to include an "update" icon that revolves with a rotate animation , while this thread is going on. Animation works by itself, but the thread is not running, despite the entry of the code issuing the logs. I suspect that due to the thread is not completely safe, and taking most CPU time, though I would love to know if there is a better way of achieving this. The updateAllFeeds () is called a button press Here's the relevant code: / ** * Rotation * / Protected rotate animation Animation Properties for GetRotateAnimation () {// log in it now Log.d ("RSS Alarm", "Performing Animation"); Rotate animation animation = new rotation animation (35 9F, 0F, 16F, 21F); Anim.setInterpolator (New LinearInterpolator ()); Anim.setRepeatCount (Animation.INFINITE); Anim.setDuration (700)...

email - How to: PHP Mail() with Custom "Mailed-By" Header? -

मैंने -f शीर्ष लेख को जैसे मेल ($ to $ $ विषय, $ संदेश, $ हैडर, "-fwww.xxxx.com") लेकिन यह वास्तव में काम नहीं करता है। यहां आप अपने परीक्षण पेज पर खुद का परीक्षण कर सकते हैं मैं नहीं कर सकता वास्तव में "मेल-इन: www02.nopayhost.com" को ईमेल में "लाइन" में परिवर्तित करें। लेकिन (कम-से-कम) '-फ' अपने मूलभूत मूल्य को "निकाला जा सकता है": "www02.nopayhost.com" । किसी अन्य तरीके से? "मेल- द्वारा: www.xxxx.com " काम नहीं करता! इसका प्रयोग करें: " -आ जानकारी @ yourdomain कॉम " फ़ारसी भाषा: ँ © د Ù? Ø§Û ?? यू ?? कहां ?? यू ?? Ú © Ø§Ø ± Ù ?? Ú © Ø ± دÙ? د Ù ?? कहां ?? Ø¬Ø§Û ?? § यू ?? यू ?? Ù Ø Ø Ø ² ² Ú Ø Ø Ù Ù ?? ØØØØØØ'Û ?? د

entity framework 4 - EntityFramework: Excluding complex type from being added to table while inserting other complex type -

Image
मेरे पास कुछ पोको कक्षाएं निम्नानुसार हैं: सार्वजनिक वर्ग की जांच {सार्वजनिक गाइड इंक्वायरीड { प्राप्त; सेट; } सार्वजनिक गाइड स्वामी आईडी {प्राप्त करें; सेट; } सार्वजनिक उपयोगकर्ता स्वामी {प्राप्त; सेट; } सार्वजनिक स्ट्रिंग शीर्षक {get; सेट; } सार्वजनिक स्ट्रिंग विवरण {get; सेट; } सार्वजनिक दिनांक समय निर्माण तिथि {प्राप्त करें; सेट; } सार्वजनिक दिनांक समय संशोधन तिथि {get; सेट; } सार्वजनिक तिथि समय समाप्ति तिथि {प्राप्त; सेट; } सार्वजनिक दशमलव मैक्सपीस {प्राप्त; सेट; } सार्वजनिक सूची & lt; क्षेत्र & gt; क्षेत्र {प्राप्त करें; सेट; }} सार्वजनिक वर्ग क्षेत्र {सार्वजनिक गाइड क्षेत्र आईडी {प्राप्त; सेट; } सार्वजनिक स्ट्रिंग नाम {get; सेट; }} जैसा कि देखा जा सकता है, जांच और क्षेत्र - & gt; जांच में कई क्षेत्र हो सकते हैं अवधारणात्मक मॉडल निम्नानुसार है: क्षेत्र आमतौर पर पूर्व निर्धारित मान डेटाबेस - 16 क्षेत्रों हैं। हालांकि, जांच में 1 या अधिक क्षेत्र हो सकते हैं। जब मैं नई जांच (जिसमें 1 या अधिक क्षेत्र शामिल हैं) बनाने का प्रयास करता हूं, तो मुझे निम्नलिखित अपव...

AES string encryption in Objective-C -

My purpose - requires app text / string encryption (especially). I know that AES is the safest encryption method for consumer use. I also understand how to convert data to the wire and back ... how to change (only one start). Many web pages and Q / AES are not clear about encryption, and none of them tell how to use code given code. For example, a webpage might say: "Here's the code ... here's what it does ..." but there is no explanation for how to use it. I've got this code through lots of research: #import "& LT; CommonCrypto / CommonCryptor.h & gt;" @implementation NSMutableData (AES) Encryption: - (NSMutableData *) EncryptAES: (NSString *) key {char keyPtr [kCCKeySizeAES256 + 1 ]; Berboo (keypets, keyboards); [Important GetCString: keyPtr maxLength: sizeof (keyPtr) encoding: NSUTF16StringEncoding]; Size_t numBytesEncrypted = 0; NSUntiger DataLong = [Self length]; Size_t BufferSecurity = DataLanguage + KCCBlockSizeAES128; Z...