Posts

Showing posts from June, 2011

How to generate XML sitemap for php website -

As we have now used WordPress for our website, and XML Sitemap, some plugins for the full plugin Now we are switching to a php website made from scratch, after some Google search, I have not got anything to help me understand how I can create a sitemap for my website. Please help with any kind of software or any web script? Thank you. It really depends on the page pages Include what-what is) But, if you do not have a lot of pages then you can only create a document called sitemap.xml . Keep it in hand and keep it in your root directory. There are lots of examples that you can simulate with a quick Google search.

c# - The process cannot access the file ' ' because it is being used by another process -

I am trying to delete the local copy of an uploaded image file (on the computer) using the file dialog I am It throws the process 'C: \ Documents and Settings \ user names \ My document \ My Pictures \ 1220.bmp' because it is being used by another process. Private Zero _btnImportPhoto_Click (Object Sender, RoutedEventArgs e) {// user clicked Import / Change photo, open file dialog for browsing for photo system. Windows.form. OpenFile Dialog file dialeg = new system.windows.form. OpenFile Dialog (); FileDialog.Multiselect = false; FileDialog.filter = ResourceFile.PhotoFileTypes; If (fileDialog.ShowDialog () == System.Windows.Forms.DialogResult.OK) {FilePath = fileDialog.FileName; FilePathCopy = fileDialog.FileName; String SecureFilePath = FilesyLog .SafeFileName; Bitmap bitmap = new bitmap (file path); Current photo = bitmap; Bitmap bitmap 1 = new bitmap (filecapcap); // When a local copy is removed to save a copy, m_PhotoCopy = bitmap1; FileSystem.DeleteFile (FilePath); ...

javascript - IndexedDB Transaction constant in Google Chrome -

चश्मा: const अहस्ताक्षरित कम READ_ONLY = 0; Const अहस्ताक्षरित कम READ_WRITE = 1; google क्रोम के कंसोल में वेबकीटआईडीटीबीटीसंसैक्शन .__ प्रोटोटा __ की जांच करना: READ_ONLY: 1 READ_WRITE: 0 मुझे आश्चर्य है कि क्या google क्रोम यहां इंडेक्सएडब चश्मा को गलत रूप से लागू कर रहा है? IDBTransaction मैं पिछले संस्करणों से बात नहीं कर सकता लेकिन webkitIDBTransaction .__ प्रोटोटा __ ऑब्जेक्ट में READ_WRITE या कोई अन्य लेनदेन स्टेट स्टंटेंट नहीं है I आज तो यह संभव है कि जिस ऑब्जेक्ट को आप देख रहे थे वह गलत प्रोटोटाइप था या जैसा कि आप कहते हैं, इसका प्रोटोटाइप (जो कि क्या होगा?) गलत ढंग से लागू किया गया था। किसी भी स्थिति में, ये स्थिरांक ठीक हाल ही में क्रोम का निर्माण: console.log (webkitIDBTransaction.READ_ONLY); & Gt; 0 console.log (वेबकिटआईडीबीटीसंहार। आरएडी_विरेट); & Gt; 1

Querying SQLite Tree structure -

मेरे पास इस तरह से तालिकाएँ हैं: पेड़ {id, name, parent } content {id, content, parent} पेड़ तालिका में एक पेड़ की तरह संरचना होती है, जहां माता-पिता 0 हैं शीर्ष स्तर तत्व और यदि यह अलग है, तो यह एक ही तालिका से माता-पिता का आईडी है। content तालिका में एक parent स्तंभ होता है जो एक पेड़ तालिका से आईडी। मुझे क्या चाहिए है सामग्री के लिए आईडी को दिए जाने पर माता-पिता के तत्वों की पूरी श्रृंखला प्राप्त करना है। मैं डॉन यह नहीं लगता कि यह तालिकाओं के लिए सबसे अच्छी संरचना है और मुझे लगता है कि मैं इसे बदल सकता हूँ। आप इस पर क्या ले रहे हैं, कृपया? सबसे पहले, मैं रूट कोड को इंगित करने के लिए शून्य के बजाय parent = null का उपयोग करने की सलाह देता हूं, जो tree मूल मूल पर संदर्भ के लिए id ; संदर्भित अखंडता उपयोगी है। फिर आप रूट नोड से प्रत्येक पंक्ति में वर्तमान नोड में शामिल कर सकते हैं। भौतिक मार्ग एक स्ट्रिंग कॉलम होगा जो रूट नोड से पथ को वर्तमान नोड तक दर्शाता है; अपने उद्देश्यों के लिए आप पथ में प्रत्येक नोड के लिए एक निश्चित-चौड़ाई प्रारूप का उपय...

android - Java Deep Copy without Serialization -

I'm writing a card game for Android, and how to protect my game status, let me briefly tell my program For, I have a card that has a sprite class to display a bitmap image, a point for the position, and a border rectangular. I pass this class to create a card category, which has two bitmaps, whether or not to face above or below the card, and depending on calculations for the suit and rank storage. These card objects are in CardStacks objects in which there is an extra position, and there is an array list of cards. There are various cardstacks in the game model, and there are rules for driving cards between the heap. This game works very well. Now I am trying to figure out how to save my game to the state. I want to serialize my entire game object and want to save it to a file. However, many objects (bitmap, point, rectangle, color, etc.) which are not serialized. In C #, I know that you can use memorystream and just copy the whole object, but I can not find the javascript, f...

asp.net - IIS 7 Bad Request response when %0A exists in the URL -

I have an application that had to accept unsafe characters from Salesforce. They are% A and% 0D (so far ...) and they are not working. to correct , 2.0 , requestPathInvalidCharacters to BLANK , relaxedUrlToFileSystemMapping to true and maxRequestLength to 1024 . It was not working. Then I tried to set a custom error for 400, which redirects to the same page without filling it. Also did not work in addition. Then I tried to do this through the IIS 7 Error Pages section and it still does not work How can I: Get the app to accept the letters? Or get an app / IIS to redirect to the same page for manual entry? This is all in an ASP.NET MVC3 application, but I suspect that matters because its possible IIS can stop it before it even calls the ASP .NET runtime. I need some help in advance thanks! You probably want to see IIS manager, click on your server node (or website node), Find a request filtering icon. Go to the URL tab and here you can always...

asp.net - ASP & SQL Server 2008 : calculated value from another calculated value -

I have to use a SQL statement which will be displayed in Gridview & amp; From CAB or Select * table totals (column 1) SS 200, Yoga (column 1) as table 001 (S & K Constant) as table amount (column 1) There should be something like Select / CONSTANT AS C01 CONSTANT will be given value to the query as a session variable. That is, the second column of Gridviv is calculated from the result of the first calculation. What would be the best way to achieve this? You need to repeat the expression, or use a subquery example eg. SELECT *, from C01 = (S00 / continuous); SELECT S00 = SUM (column 1) from table);

php - Change now() function's timezone -

I want to keep my country time in the reg_date area in my DB table. But now () sets the time of the server How can the timing of the now () function change for Azerbaijan (UTC +04.00)? The timestamp should be returned in the current timezone as set on your system. If you can not change the time zone of the system, you may need to manipulate PHP / Ruby / Time before saving it, or you can save time by using UNIX_TIMESTAMP (). You can choose the option . Using code (PHP) (5.3+) to manipulate the time zone before INSERT ING in the database: // .... some predecessor items $ date = new dateTime (); $ Date-> Set timezone (new datetime zone ('Asia / Baku')); $ Fdate = $ date- & gt; Format ('Y-M-DH: I: S'); // Now format the form now () $ query = "TBL (field, built-on) values ​​('bla', '$ fdate')"; Mysqli_query ($ query); // ... and so on

ios - Facebook Single Sign-on (SSO) stopped authorizing existing iPhone app -

Our iPhone app (using iOS SDK 4.2) successfully used single sign-on since 5/23/2011 Is doing while starting with 8/31/2011, when a user tries to authorize the app 1 time. The Facebook app will open as usual, then exit immediately before giving an option to authorize. After this, the Facebook app will stop our app with the following error status in the custom URL scheme and return it: {type = 15, string = fb257001395154: // authorize # error_reason = user % 5Feddied & amp; ; Error = access% 5Feddied & amp; Error_description =% 2Buser% 2Bdenied% 2Byour% 2Brequest% 2E% 3F% 5F, encoding = 134217984, base = (empty)} I tested using the latest of Facebook IOS SDK Did the version and the same result have been found to see this error? Did Facebook make a recent change that requires applying all app pages? I still have the same problem, an existing app is now able to authenticate to use Facebook. No, I was lost the iOS bundle id from the Facebook App Settings page. Unfortunat...

jax ws - Is there a way to add XSD Restrictions to a JAX-WS generated Schema? -

Seeing the package javax.jws and related documentation I did not find any way to do this automatic XSD restriction Generates, e.g. & Lt; / XS: Ban & gt; & Lt; / XS: simpleType & gt; & Lt; / XS: element & gt; Is there something fundamental that I'm missing? And am I probably asking wrong questions? I do not think you are losing anything - you just hit the borders which are there you are presenting the enumeration Things to do - take a look - but this is something that you like and believe that javax.xml * That is what you refer to as related.

iphone - How can I replace the imageView in a UITableViewCell? -

I have a type that comes from the UIImageView but adds some extra functionality I can see it in my UITableViewCells But rather rather want to create a new cell layout, so that I can add this image. When I try to set the image view directly ( self.imageView = myImageView ) I get a compilation telling me the error is that the imageView is read only. Is there any way around this or I need to write a new table view cell class For more clarity:? @interface MyImageViewClass: UIImageView {} @end ====================== @interface MyTableCellClass: UITableViewCell {} @end @implementation MyTableCellClass - (zero) setupCell {MyImageView * imageView = [[[MyImageView alloc] init] autorelease]; Self.imageView = imageView; // & LT; There is a lot of options here ---- this is a compilation error thrown by an error code} @end . You can insert your image view in the same room as a normal image view in the same place. WillDisplayCell: forRowAtIndexPath: in tableView , you can s...

c# - Play Video in ASP.NET website -

OK, it's as simple as How can I play video in my website (Like MP3) I know that I am not writing much and I have a lot to understand, but it is as simple as that open source.

Match HTTP parameters in URL with Android Intent Filters -

When using a certain HTML URL in the browser, I try to gather an intention filter to start my application I am here. For example, as a standard URL such as www.stonyx.com, I have no problem doing this. However, I need to match a URL with HTTP parameters such as www.stonyx.com/?pagename and it's a part of it later? I have tried to use Android: Path, Android: PathPrint, Android: Pathparent, and none of them is doing this to me ... Sure. It is not because of this that I am doing something wrong or if this is just because it is a php path with a question mark. Any help is highly appreciated. P.S. At the moment, my intent filter looks & lt; Intent-filter & gt; & Lt; Action Android: name = "android.intent.action.VIEW" & gt; & Lt; / Action> & Lt; Category android: name = "android.intent.category.DEFAULT" & gt; & Lt; / Category & gt; & Lt; Category android: name = "android.intent.category.BROWSABLE" & g...

setTimeOut jquery problem -

I would like to scroll the window at the top, stop my animation for 1 second, and then use the fade Content, but this code does not work, do you know why? $ ('# link') Dump ('click', function () {preloading.show (); $ ('Html, body'). ({'ScrollTop': 0}, 300, function () {$ ('# myDiv') setTimeout (function () {$ (This) .empty () .append (conteneurBio) .hide () .FadeIn ('slow', function () {preloading.hide ();}}}}, 1000);}) Will not this also work? $ ( 'Html, body'). Animate ({'scrollTop': 0}, 300, function () {$ ('# myDiv') .empty () .hide () .append (conteneurBio) .delay (1000). FadeIn ('Slow', function () {preloading.hide ());}});

php - Search feature for my site -

I need to add a search feature to a site that I am creating and thinking that anyone has Have done something. I have a sample table in which the description of cats is in this format: name, location, type, age, gender and size And I have only one search box where users can enter their search terms My question is, how do I find the table, for example if there is a type of "cat in Paris"? I want to find all fields and if I find anything, I would like to return. Is there a way to achieve search criteria rather than keeping several boxes? Any help or suggestions would be appreciated. In this situation it works very easy to do a complete search in Mysql Can index a natural language search If you had a mysql table with the following schema, the cats: mysql> Leave cats; + -------- + -------------- + ------ + ----- + --------- + - - ------------- + | Field | Type | Faucet Key | Default | Extra | + -------- + -------------- + ------ + ----- + --------- + - ...

android - InstantiateItem in PagerAdapter and AddView in ViewPager confusion -

So far, I'm hacking instances together to be realized as a full API Afaiodis SDK. Although I have hit a deadlock I am trying to spread a linear layout with 2 text visas from an XML file, this will be the pages that I can just get it to work And I feel that I do not fully understand what is happening with the code. Looking at the source, I can see that the method calls InstantiateItem from ViewPager.addNewItem supply adapter. And addNewItem is said to be populated (), populate is called in many other places. However, I have seen instances when the override method for Pejhraadaptr, you have a call on AddView on ViewPager Collinshn which is passed from view paper as an argument . If I want to add several scenes have so I think it would be a case of being called to add more than once, but instantiateItem ViewPager seen an object (for example, I find it It has been added) I do not know what to return I have tried to return the inflated scenes and many other things Can anyo...

Rails 3.1 asset precompilation - include all javascript files -

Specifically, the default matcher .js does not connect the files to the vendor / property / javascript to compile the files. I can simply add the property to the config.assets.precompile list, but it seems annoying I do not want to refer them to the application.js manifest because I want to Do not include them in all pages. In short, any way to request this is found in .js in the seller / assets / javascript files , but without all the pages included? config.assets.precompile accepts regular expressions and wildcard matches - In order to ensure that all JS files are compiled without specifying each by the name, something like this should be done: config.assets.precompile & Lt; & Lt; '* .js'

javascript debug tool:firebug, chrome javascript control panel, visual studio for javascript -

As I know, there are some options Firefox firebug chrome javascript control panel visual Studio What is the best javascript debug tool? Any comment All of them after their development and testing equipment , And you should test and develop in many browsers and multiple platforms. Personally, I like webkit developer tools in Safari / Chrome, but this is just because these are my favorite browser, so I used to be the most used but I used to have them all once I write on all the other code that I write (unless I target only a specific browser / platform, but this is rare). I suggest you start with the developer tool for a browser already using it if it troubles you, so it is okay to choose others. They all work very similarly.

Modify haystack query syntax? -

Is it possible to modify or expand how a heap of grass understands a query? For example, to get a SA-style search, consider integrating a grass heap with an OSQA-based site - a search where the regular keyword question / answer / comment text, But are searched where the "syntax" like "[tag]" should be limited to the tag field of the question. At some point we can say "Users: Infinitecode" and "Score: 0" like Would like to add other stuff, but for now These keywords and tags are necessary. Unfortunately, it is not as easy as regexing by tagging it out of the query string and using it to filter on the tag field, because we use and , or want all the complexities, code> no , and the arbitrary group to apply. Is it possible with a heap of grass? Better yet, has anyone done it before? It looks like how Haystack AutoCwire works, It was preprinting the search query to remove the tag and other custom syntax that was ending, ru...

r - Is there a way to colorize comments/code in Sweave? -

I found that I can put comments in the svway code chunks by specifying keep.source in SweaveOpts but there is one How do the code entry make it look good with graying comments? There are several options illustrated in Vanderbilt This is another option.

How do you catch errors in the rails asset pipeline before production? -

I'm just getting acquainted with Rail 3.1, and I burned some time to update an old project and it Tried to know how the new property develops pipeline production mode vs. The default config.assets.precompile setting only application.css and blesses the application JS , the same stylesheet And everything should be served as a javascript file. Obviously such situations happen when we do not want to do this, so we can add items to that configuration variable list ... When I go to production my sandbox Status of the project running with me: Look at the site in development, seeing that everything is working. Assets were added as separate files and the site was displayed correctly. The site was uploaded to my server, and it tried to work in production. The first error was saying that "ie.css" (a conditional stylesheet) is not precompiled. (I was in Safari and this stylesheet will also not be downloaded: An error was encountered with the stylesheet_link_ta...

git - Master failed to write error while pushing commit -

I have a git repository on a company network drive and there is no problem pulling from it. However, I was not able to do any commission in it, although I had some good luck but recently I could not find anything in it. Error was: C: \ program files \ git \ bin \ git.exe "core" master push: master error: ref / head / master could not set // software / pdd Git /! [Remote Dismiss] Master - & gt; Master (failed to write) Error: Failed to push some referee for '//software/pdd.git/' '' I suspect that it is called master On the file file, it shows that I have been put in a network group that does not allow me to modify but was able to read, write and execute. My question is this: If I was able to push some time ago, this file permission should not be a problem for me. If this is, in fact, not enough private sector to modify me, then what is the solution? PS: Company is reluctant to convert my network group to another, which enables me to modify fil...

c# - Assignment of fields/properties in a struct -

संभव डुप्लिकेट: ऐसा क्यों है माइस्ट्रेट परीक्षण = नया माइस्ट्रैक्ट (); Test.Closed = सच; महान काम करता है, लेकिन MyDictionary [key]। बंद = सच; दिखाता है "अभिव्यक्ति को संशोधित नहीं किया जा सकता क्योंकि यह एक चर नहीं है" त्रुटि को संकलन करने में त्रुटि? इन दोनों मामलों में असाइनमेंट के बारे में अलग क्यों है? नोट: MyDictionary प्रकार संरचना के लिए कोड है: सार्वजनिक संरचना माइक्रांट {// अन्य वैरिएबल सार्वजनिक बूल इस्कलॉज; सार्वजनिक बूल बंद {प्राप्त करें {वापसी इस्लामिक है; } सेट {इस्कलॉल्ड = वैल्यू; }} // कन्स्ट्रक्टर} क्योंकि MyDictionary [key] एक संरचना लौटाता है, यह वास्तव में संग्रह में वस्तु का एक प्रतिलिपि लौट रहा है, वास्तविक वस्तु नहीं है जो कि जब आप किसी कक्षा का उपयोग करते हैं तो क्या होता है संकलक आपको इस बारे में चेतावनी दे रहा है। इस पर काम करने के लिए, आपको MyDictionary [key] को फिर से सेट करना होगा, शायद इस तरह: var tempObj = MyDictionary [चाबी]; TempObj.Closed = सच; MyDictionary [प्रमुख] = tempObj;

How to implement "import" in a Python-like interpreter? -

I'm just writing a dragon interpreter to see how some language features can be implemented . Now comes the issue of implementing "import" ....... Do you have some suggestions on how to do this? What are some potential problems? Try it -

iphone - UIBezierPath Gives Sharp Edges -

When I'm using UIBezierPath where the user is touching the user, the user sometimes moves faster Sometimes I find really difficult points, what can be a clue like the tip of a triangle, due to this? Or how can I fix it? I am capturing / moving / ending points using touch and putting them in an NSArray of UIBezierPaths. Despite the name, UIBezierPath does not curve only. Basically, this will not happen by default - you are probably going through the return coordinates from touch etc., to the addLineToPoint method. Instead of directing all touch coordinates directly to UIBezierPath , you should first tamper with them to avoid these sharp lines, when you fast your finger Will move to the screen. This is not very difficult, although some knowledge about this is how the Bezier curves work and spline interpolation If you are exploring a little easier way, then there are some open source libraries which will do this for you, like this:

How to Execute Javascript Code Using Variable in URL -

I'm really new to javascript and I have some problem how to get the following to work. My goal is to execute a certain JavaScript action, when a page loads and a variable added at the end of the URL that executes the Javascript Action. The URL of the page on which I want to apply it Each of the "Extended" buttons, which operates JavaScript, drop-downs of a fixed area of ​​the page Finally, I would like to be able to create a URL which will automatically drop down a certain category when the page is loaded. Can anyone explain this process to me? Thanks in advance for any help! You already have a call calling function: toggle2 () , Which, in the end, takes two parameters to be equal for all categories except for a number, then create the URL that contains the number: Then use that number as a regular expression using the location Find in .hash . It's strong enough to handle multiple URL parameters, so you should decide to use them in the future: / [\ # ...

javascript - $(this).addClass() not working -

I can do $ (this). Children ("a") AddClass ("class") and it works fine, but when I do $ (this) .addClass ("class") this is not working I have a mouseover function I am using $ (this) inside. $ ("# site nav li.hasChild") Mouse ("function") {$ (this). Children ("a"). AddClass ("selectedTab"); // fine $ (this) works. AddClass ("selectedFixTab"); // $ (this) work Children ("ul"). CSS ("display area");}); HTML: & lt; Header id = "site" & gt; & Lt; NAV & gt; & Lt; Ul & gt; & Lt; Li id = "li1" class = "hasil" & gt; & Lt; A href = "#" & gt; Fix & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 2 & lt; / A & gt; ...

Python - New beginner question, invalid syntax from a example file -

I am trying to learn Python myself, but I have failed on basic topics. I am going through a set of examples from a book, and the first example was: import seri zero = ['***', '* *', '* *', '* *', '* *', '* *', '***'] = = ['*', '**', '*', '*' ,' * ',' * ',' * ** 'two' ['***', '* *', '* *', '*', '*', '*', '**** * '' Three = ['*** **', '*', '**', '*', '*', '* *', '**'] four = ['*', '* ',' * ',' * ',' ****** ',' * ',' * '] five = [' ***** ',' * ',' **** ',' * ',' * ', * * *', '***'] six = ['*', '*', '*', '****', '* *', '* *', '****'] seven = ['*****', '*', '*', '*...

.net - Measure code coverage with black box testing -

Is there a way or device to measure code coverage during a black box test? I have to assess the code coverage from the web application that runs on dot net source code. Many code coverage tools that may be used for you by the net; However, due to user error, code coverage is against the running application against the application against the unit / automated test against the issue (incompatible reporting) and you have to apply to talk to the profiler. Commercial offer may be better for you in this regard (as it is a specialty that they can sell) You really should have coverage against a test suite, namely Newnet / Ameste - I personally Under the user's (tester / dev / real) control, I take very little profit to use the code coverage tool against the actual running applications. (Sequence and IL coverage). - Support for integrating into IIS is in the pipeline; But you can use it against iisexpress (sequence and branch coverage). All of the above, I believe, to get...

algorithm - Shuffle list, ensuring that no item remains in same position -

Image
I want to revoke the list of unique items, but do not want to completely shuffle randomly. I need to make sure that no element in the ugly list is in the same place in the original list. Thus, if the original list is (A, B, C, D, E), then the result would be fine: (C, D, B, E, A), but this would not be: (C, E, A, D , B) Because "D" is still the fourth item. There are seven items in the list. Extreme efficiency is not an idea. I think that Fischer / Yets performs this modification, but I can not prove it mathematical: function shuffle (data) {for (var i = 0; i & lt; data.length - 1; i ++) {var j = i + 1 + Math.flur (Math.Rendum ( ) * (Data length - i - 1)); Var temp = data [j]; Data [ja] = data [i]; Data [i] = temporary; }} You are searching one of your listings. First of all, your algorithm works in this sense that it represents a random satire, i.e. a permutation with no fixed point, though it is a huge defect (which you do not mind, But it is worth keeping ...

Need example of Perl JSON usage -

How can I parse a JSON string in Perl? Note: I am a C ++ / Java / C # software engineer, not a Pearl-Worlding Scriptor. I've read way to find examples of work "documentation" full, but those docks were completely gone and out of the trash ". I also read, but no one knows that Disdd how to get Jeso key, value added Perl variables. $ json_string = '{ "foo": "bar"}'; my $ decoded_json = decode_json ($ json_text); Print $ decoded_json [ "foo"]; std :: map & lt; string, string & gt; mymap = convert_to_cplusplus (decoded_json); # I asfjsa; fjsa; fwe # work Does I was disappointed to end. you $ decoded_json- & gt; { "Foo"} --- curl bracket Note Also arrows are not square. - & gt; --- decode_json gives context. I have no help in this case that would easily accept the documents that the person who did not know already, Pearl, for example For, at the level of knowing that $ perl_hash...

Eclipse fire up new Android instance every time you clicks "Run" -

I have problems with Eclipse and Android SDK in one of my computers. Every time I "click" or "debug", the eclipse "opened" will open a new Android instance instead of refreshing the app in one. Meanwhile, the console print [2011-09-02 16:46:13 - Emulator] Warning: Data split is already in use. Changes will not stay! [2011-09-02 16:46:13 - Emulator] WARNING: There is already a cache partition in use. Changes will not stay! I restarted my computer and the problem is still there. PS I have never worked Android properly on this computer, but I have set up one and three laptops that work well. They are all windows7 64bit machines. Thank you. I hate that you did all of that work, even the OS installed again - The answer is quite simple if it ever happens again (and this, I deal with it often), you have to kill ADB through the command line, close the emulator, take off, resume eclipse, then Run configuration needs to be edited. Select the c...

character encoding - How to convert cyrillic charachters to ASCII codes with javascript -

I need to change all the extremes from 0 to 255 with ASCII code from the CRP 1251 table. The only way I found so far is the charcott () function that only works up to 128 codes. For the upper code this is a unicode number issue which is not good for me Thank you in the advice :) The first 128 characters in CP1251 are similar to letters in ASCII. After that, they represent non-ASCII, Cyrillic characters, which can not be converted into ASCII. Consider using Unicode, which was invented to solve this type of problem.

Creating a new rails 3 project over a proxy in windows -

My computer works on a proxy, so I use the following command to install prisons gem install -p http // # {proxy-server}: # {port} rails If I use the normal gem installed order, Error gets can not get gem . I set up 3.1 rails today and tried to create a new project. Halfway when generating files, the generator executed the run bundle install and ended the same error Source index for http://rubygems.org Receiving / RabbiGemage repository could not be reached http://rubygems.org/ Mani 'twist (& gt; = 0, runtime)' could not be found in any gem source listed in your Gemfile. The generator is trying to install some gems without proxy. How can I override this existing functionality? I want the generator to use gem install -p http // # {proxy-server}: instead of gem install # {gem} # {port} # {gem} / Code> Add the given option to your gem : -p http // # {Proxy-server}: # {port} Under Unix, this file is located under ~ / .gemrc , which I do not ...

jquery - ASP.NET MVC: Displaying JSON in a grid where JSON data only known at runtime -

I have spent a long time doing this work, but there is no such success in this way. Originally, a JSON dataset will come in, which comes through a jQuery GET or similar, which will vary in number of column and column names. Datatype will be different once this name can be = Bob, age = 50 (etc.) next time it can be name, address and business. What I want to do is present in my grid MVC footage, which provides some paging / sorting etc. The column name should be obtained by label in JSON. If necessary, I would be happy to pay for such a component. That's it! If I'm unsuccessful then I think I have to submit the HTML and have to do without other features. Thanks The PS will come from an unknown archive generated by LINQ queries in the actual data controller. If someone knows that to be bound for such type of thing would be the right measure (good on demand paging), but there is no luck yet. The telereal MVC grid has been unsuccessful for 2 days, or any of its conversio...

javascript - ValidationGroup in ASP.NET -

I have a lot of this After all verification is complete, I now want to call disableAfterClick () . It should be in the client side. So that I can ensure that the user can click the button only once function ValidateText () {Page_ClientValidate (); If (Page_IsValid) {$ ('# & lt;% = btnSaveContest.ClientID% & gt;') Attr ('disabled', 'disabled'); Back true; } Other {return false; }} `

c# - SharePoint 2010 – Dynamic Columns in List View -

I want to check something before solving a long time in a problem. I make sure I make some stupid or inconsistent I'm not trying to Currently I am working on a SharePoint project where I have created a list in Visual Studio, which has different views. The requirements are that one of these ideas contains many calculations on the data related to the current date, and the value of items over time. I know very well about today's problem, so do not want to store these data in the list, but I would like to dynamically calculate to reflect the calculation of data. There is a problem I'm not sure it can be done. Obviously I can shift a web part which creates a grid using the list data in the code, but this is not ideal because I would like to include everyone outside the box list functionality to add columns to XSLT or jQuery Is there a way to customize the list view page? Can this be done in a visual studio sandbox solution because we are trying to not use SharePoint Design...

sql server - Variable length int columns in SQL -

I have a database with two tables: user and categories . Users These are the fields: User IDs unique identifier user name nvarchar range iid int At this time, each The user is in a category. I want to change this so that each user is in any number of categories. What is the best way to do this? My site searches for very expensive, so the solution should be as efficient as possible. I really do not want to put the list of categories in every third table, because this means that when I pull back a search, then each user will appear in multiple rows at the same time (at least, this is what happens if I Existing, quite raw, has implemented a search with the understanding of SQL.) Edit: If there are many-many relationships to be established, then only one row each Use For Gkrta? For example: DECLARE @SearchUserID nvarchar (200) = 1; Join the user from the selection JOIN CategoriesPerUser WHERE UserId = @SearchUserID This will return a line for the...

winapi - How to capture WM_SHOWWINDOW command in MFC -

Whenever a dialog box is displayed, I am trying to take some action. Like this we have a gentle dialogue, and we are hiding / showing the dialogue on some button clicks. But when we are shown a dialogue, we need to take some action. I have included the WM_SHOWWINDOW message, but the control is not coming inside the OnShowWindow (BOOL bShow, uint nStatus) function. We are using the ShowWindow (SW_HIDE) and ShowWindow (SW_SHOW) function to hide / show dialog boxes, please suggest suggestions on how to get some pointer. Thank you in advance Mukesh Along with Notepad and Spy ++ it has been tested with: #include & lt; Windows.h & gt; Int Callback Winman (Hunsstas Instance, Huntsstäus Pre Preinstance, Lpstrap LPCMDline, Int NCMD Show) {HWNH HWND = SearchWindows (Zero, L "Untitled - Notepad"); ShowWindow (hwnd, SW_HIDE); Sleep (4000); ShowWindow (hwnd, SW_SHOW); Return ERROR_SUCCESS; } For window hiding, you should be getting WM_SHOWWINDOW, WM_WINDOWPOSC...

.net - What is best practise of using DateTime in different cultures -

I have an asp.net site on several pages, datetime is used to shut down the user and then its Along with some DB table is inserted or updated. My problem is that I have two versions of the site: local for testing (Ukraine) and production (USA). Because the datatime format of different cultures in these sites is different. What is the best way to unregistered workflow with Datetime format? For example, I have a page with textbox in which this datatyme is entered and the regular expression validator. How do I work with my local site (dd.mm.yyyy in DT format) and production time (MM / DD / YY)? Thank you. You can define culuture in web.cconfig and code consistently.

sql - ruby on rails equivalent statement of find_by_sql -

What will happen when given the following given below? @mostviews = post .find_by_sql ("select posts.id, from posts.title posts countpages.post_id = count.pages.counts desc range 5 on orders.id command" 5) @temp = Post.find_by_sql ("Selection post_id, COUNT (*) counts posts as a post_id by the group by AS count, posts = posts.find_by_sql (" select posts .post, posts title, comment_count.count inner joiner posts) comment_count.post_id = posts.id Comment on "Count 5" from the limit of DESC as count; ") Is it possible that you find or use the function? post. Selection ("Post id, posts.title"). Join ((countpage) .order ("countpages.counts desc"). Limit (5) This count is a union Otherwise, you may be more explicit in joining ("INNER JOIN ... ")

jquery - How do I remove list items that have been added by append? -

I want to be able to add objects to an unshared list (wibble) when a large list of items (user_checkboxes) Is selected from). If a user clicks on an item in the 'wibble' list, I would like to remove that item from the list. The problem I have is that the list works as 'A' and 'B' items I was hoping for. That means if I click on the list item, they are removed from the list. Unfortunately, any items that are added to the list from the app do not behave in the same way. That is, they are not selected and removed from the list. & lt; Ul class = "wibble" & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; Li & gt; B & lt; / Li & gt; & Lt; / Ul & gt; $ (Document) .ready (function () {$ (". User_checkboxes"). Change (function () {if ($ (this) .attr ("checked")) {$ ('.wibble'). '& Lt; li & gt; '+ newListItem +' & lt; / li & gt; ';)}} $ (' .wibble l...

Javascript form submitting with multiple links -

I have simplified my code for this question but my last webpap has ~ 100 forms on one page instead of two. My question is, what is the best way to submit a form to my link with Javascript, which I do not clearly do, because there are several types of fields that are called support types. What is the best way I want to do ~ 100 forms on a large scale? & Lt; A href = "javascript: getupport ('form1')" & gt; Form 1 & lt; / A & gt; & Lt; / Form & gt; & Lt; Form name = "albumdl" method = "post" action = "processLinks.php" & gt; & Lt; Input type = "hidden" name = "support type" /> & Lt; A href = "javascript: getupport ('form2')" & gt; To 2 & lt; / A & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt; You can dynamically create the form: function getSupport (type) {var f = document.createElement ('fo...

java - Regex for university emails -

I'm making sure that they are a specific university subdomain, looking to validate email addresses, e.g. If the user says that they go to Oxford University, then I want to know that their email ends in .ox.ac.uk. If I have '.ox.ac.uk' stored as a part variable, can I confirm that the whole email is valid and that variable ends in suffix? Many thanks! We are using this email pattern (received from): ^ [\ w! # $% & Amp; '* + / =? ^ `{|} ~ -]: | - * @ ((\ [\ w # $% & amp; * '+ / = ^' {} ~]?.??): [One-zA-Z0-9] ([a-zA-Z0-9 - ] * [One-zA-Z0-9]?) \ [+ Z- $ ` You should be able to expand it with your required suffix: ^ [\ w # $% & amp; '* + / = ^ `{|} ~ - + (?.!: \ [\ W # $% & amp;],'? * + / =` {|} ~ -]) * @ - \) + ((: [A-zA-Z0-9] ([one-zA-Z0-9] * [one-zA-Z0-9]?):?. \ .x \ .ac \ .uk) $ ` Note that I changed the TLD part [a-zA-Z0- 9] (?: [A-zA-Z0-9 -] * [a-zA] -Z0- 9])? (? Ox. .c \ .uk) ( . with its required suffix to...

ios - Handling hidden errors Objective C -

We've all come across clear errors and complex errors. I'm currently programming an iPad app several times Which are really hard to track down. Even when using NSUncaughtExceptionHandler (); And many other error handling calls My question is that when you try all the obvious techniques to track an error, and you crash the app for no apparent reason What are the best advances and what are the best error handling techniques? Console output Current language: Auto; At present, the error of killing A-C while hitting the goal (kill anyway): Warning: "Source / () / (OS / Kern) Failure (0x5x) Exited with exit code of the program: 0 this debugger is crashing / error, not your app though , It is possible that some rails have been closed in your app, causing the debugger to be useless. You may be corrupted or for example, for example Withdrawal from memory. Along with that, the latest devices are up-to-date because the debugger usually has a bug fix that en...

graphics - Merge two images for "fade" transition with changing opacity? (C#/PNG) -

First of all, I would like to suggest that this question is not a duplicate. At least my opinion is :) What I want to achieve is "Fade" is a series of frames for animation. I select two PNG files (for example: they say they are the same size), for example: I want to "simulate" them in the graphic editor to merge like layers. I put Pic1 at the top with the opacity 255, Pic2 with ambiguity 0 below, so firstly I only look at Pic1. Then I change my opacity, like: Is there an easy way this? In a winforms app it can be done very easily Create user controls with some properties: get image from public image; Set; } Public Image ToImage {get; Set; } Private float opacity = 1; Now open override protected override zero onpaint (paint event erg e) {if (semaj! = Null & amp; theme! = Null) {Color Matrix Matrix 1 = New Colors Matrix (); Matrix 1 Matrix 33 = opacity; ImageAttributes attributes1 = new image properties (); Features 1.SetCol...

javascript - Making the first column of a table fixed on horizontal scroll -

Thanks for reading I have a table inside a divan container (div0). The table is populated with data and is dynamically generated. Therefore, the height and width of the table is not fixed. Both the vertical and horizontal scrolls can be seen to view the entire table in the outer table. Now the requirement is that I need to correct horizontal horizontal form of the first column of the table. When scrolling the horizontal scrollbar, the first column should be fixed and the rest should be skulled. Just some indication on this, how is it necessary to get it? I'm thinking of dividing the first column content in a div (div1) (which is not horizontal scroll), and the second scroll material is in a different divis (div2) both a line and 2 Has been placed in the table with TDS. Now I am getting 2 probes with this approach, 1 when I scroll right, div is going to divulge the scrollbar inside div0 (thinking of using a jquery scrollbut but how it is excluded from div2 ) The second is alig...

Java: Input strings with keyboard class -

I am trying to input input in the Java console application, but I can not seem to run it. My Java file is thus appearing: public class Ovning1_3 {public static zero main (string algos []) {string name; System.out.println ("Enter your name"); Name = keyboard.readString (); Println (name); }} But I get an error: Exceptions to thread "main" java.lang.Error: unresolved compile problem: no keyboard Can be solved at Ovning1_3.main (Ovning1_3.java:9) I have a keyboard in my source folder. Class file is I am using Eclipse with Ubuntu. AnSol compiled problem: That code can not be compiled You have to import the keyboard, something like import uitl.keyboard when you have a different package (similar to the current class No packages), you have to import the class. If the class is in the same package then you do not need to import. Classes are generally grouped. How do you know the package? Go as a first class. It should be something lik...

php - How to remove backslash on json_encode() function? -

How to remove (\) backslash on a string? For example: & lt ;? When using php $ str = "$ (\" # output \ "), echo json_encode () ? ) .append (\" & lt; p & gt; This is an exam!! & Lt; / p & gt; \ ")"; Echo json_encode ($ str); ? & Gt; Note: When you explain $ str, there will be no problem ... but when you json_encode () , (\) backslash will appear. Is there any way to solve this? Thank you. json_encode ($ response, JSON_UNESCAPED_SLASHES);

asp.net mvc 3 - Add User Roles on Registration (Forms Authentication) MVC3 -

I am developing an MVC 3 project and want to add a registered user to a role using form authentication. I am That's why I want to make some check boxes, or show roles in a drop down list, which are selected and the user has been registered as a role. I still have this code, which works: Public Action Register () {View Data ["Roleplay"] = New Selection List (Roles.GetAilroll () , "Role-name"); See Return (); } And in this view I have: This is the HPPOST section of the controller, and this is the part that I do not know the code: [http post] Public Action Result Register (Register Modell Model) {if (ModelState.IsValid) {// Try to register user membershipStats vsstats; Membership Buyer user (model user name, model password, model email, blank, empty, true, empty, outdoors); If (createStatus == subscribe) stability) {form attestation.SetAuthCookie (model.UserName, false / * createPersistentCookie * /); Redirect Action ("Index", "H...

C# .NET Resources -

Is it good to load configuration data for an application through the use of resources? Please let me know. I am actually working with Robotics Studios and I do not think there is any other way to load any configuration. Depending on the data you want to load, you can use the features of .NET Are there. The app settings enable you to store and retrieve property settings and other information for your application dynamically, it is also capable to maintain custom applications and user preferences on the client computer. Are there. If you want to load data in large quantities, then resource (external or embedded) may be a better idea.

javascript - mailto potential - what can i do with it? -

Is it possible to embed HTML into a message body generated from the mailbox? And / or embedded images or javascript too? If so, can you provide an example (it is not necessary to be encoded)? Besides, what other things can I do and which important things I can not do? Yes, you can! Mail: info@rok-kralj.net? Cc = Nobody@at.com&bcc = ccc & amp; Subject = test & amp; Body =% 3Cb% 3Etest% 3C% 2Fb% 3E You can post a lot in the body, just avoid tags from Html entities like & gt; & Amp; Lt; & Amp; Quot; . And I believe the length of the URL is the limit. Oh, and do not forget the URLX code at the end!

r - factor with 6 levels out of a continuous variable -

I have a continuous change of frequency which is from 0 to 6.115053. I need to divide it into 6 levels, my analysis will be more readable in this way. I have tried: frequency.new & lt; - hist (all instances, 6, plot = FALSE) all frequency & lt; - as.factor (frequency.new) but I get an error that I do not understand: error in sort.list (y): 'X' should be atom for 'sort.list' Do you have to say 'sort' on a list? Can anyone help me? Thanks a lot! Katrina You must include cut () Should look at the function. You should keep in mind the last line of your answer (in bold). & gt; Set.seed (42) & gt; Cut (Ranif (50), 6) [0.8] (0.825) 0.99 (0.825,0.9 9) (0.167,0.332) (0.825,0.99) [5] (0.496,0.661) (0.496,0.661) (0.661 , 0.825) (0.00296,0.167) [9] (0.496,0.661) (0.661.0.825) (0.332,0.496) (0.661.0.825) [13] (0.825,0.99) (0.167,0.332) (0.332,0.496) (0.825,0.99) [17] (0.825,0.99) (0.00296,0.167) (0.332,0.496) (0.496,0.661) [21] ...

iphone - UILabel value not changing -

I have established a UILB (declared in H). In the Viewdupputer method, if I type myLabel.text = @ ""; , then it works. But somewhere I place this same exact line, nothing happens on the label, the label is in a custom cell view controller, which uses another UITableView class as its custom cell. So I thought I had to reload the table after making changes, but she did not work either. Even in the WillAppear method of seeing it works only, not only Dippear. Any ideas? Try this: self.myLabel.text = @ " ";

iphone - How to read standard barcodes (EAN) with zxing? iOS -

Hi guys, Just a quick question, how do I read non-QR code with zxing? I am setting up ZXingWidgetController in the 1st mode, and I am using a Multiformat Reader, although barcodes will not simply scan. Any suggestions? According to your site, only QR was placed in the iPhone. iPhone: Objective C / C ++ (QR code only) to iPhone customer + port

javascript - Minor problem while loading page with jquery -

I am using the slidedeck jquery plugin which basically puts slides on my page. Everything is fine, but the problem is with the CSS loading part. Under these slides I have an import statement for another page. I am importing this page before I appear completely, which is the data from the database Brings a lot. So whenever I open my page for the second or the second, the display for my page is the hail wire. The probable reason for this may be that I am putting much of my responsibility in which the document has one for these slides. Therefore, even when the document is not fully loaded for the duration of the slide, it still does not appear. (As they appear but in a weird way ...... they are all on the page !!!!) Do I believe that my CSS and Jquier will be first loaded and then a call will be made on this page What I am importing or something like this, I just want my performance to be alright in the beginning. This is the slidedeck jquery plugin I am using slidedeck: ah I a...

java - Is there a pattern for re-using a BufferedWriter? -

I am reading XML files from a directory (containing thousands of files), processing the content and for each input File to write an output file. Is there a way to re-point out an existing BufferedWriter rather than creating a new instance for each file? ... scanner scanner; Buffed Writer Writer; File outfile; (File f: for directory listing file []) (scanner = new scanner (f); outfile = ...; // processing input author = new buffed vitter (new flumerwriter (new file (outfile)); // Content Writer Type Flush (); writer.close ();} ... It looks like scanner and BufferedWriter . It seems like a pre-adaptation to me Soft on the JVM Planet It is one of the best pieces of the software and can detect whether your objects are short-lived or not. This (and will also) can load a bottle of optimization. It is most likely that any micro- The result of optimization will be only in poor performance. Remedy is for optimizing performance, not a reason.

linux - C and file permissions -

I am using Ubuntu Lucid links Writing data in a file through a program It is possible that only the permission has been read, if this is not possible, then there is no way to give sudo access to a program programmed program. For files without permissions, I save the data in a string. Then I open the file with the option to write: FILE * fp = fopen (file_path, "w") fputs (string, fp); Fclose (fp); Generally what you want to do in Unix, the ownership of the implementation of this program: Set the root, world executable, then set the SUID bit on it. chown root filename chmod 4775 file name What is the meaning of bits, but for all see this together that means whenever anyone If this executes the executable, they receive the executable process' user ID set owner (route).

php - Wordpress Automatic Backup Modification -

I am currently trying to change the script so that they can save the file on a more regular basis (approximately 6 hours In a bar) At this time I can not get it to work, so any help would be greatly appreciated. I've added 'often' in the automatic-wordpress-backup & gt; Adding 'often' to the following code (line 36 9-373) along with 600 init function (line 51): & lt; Select name = "s3b-schedule" & gt; & Lt ;? $ S as Php foreach (array ('disabled', 'often', 'hourly', 'daily', 'weekly', 'monthly') :? & Gt; & Lt; Option value = "& lt ;? php echo strtolower ($ s)? & Gt;" & Lt ;? Php if (strtolower ($ s) == get_option ('s3b-schedule') || ((get_option ('s3b-schedule') === incorrect || get_option ('s3b-schedule') == '') & Amp; $ s == 'Daily')) Echo 'Selected =' Selected ''? & Gt; & Gt; & Lt ...

iphone - how to create a corner button with IB? -

For example we can easily set a corner button with code. Layer.cornerRadius = 9 But I want to end it with interface build I can not find longer in IB Can you help me? Thanks in advance! No, you can only code in the radius, radius.

dependency injection - How to inject context using RoboGuice in Android? -

I would like to inject my references to my utility classes, I have seen the use of static fields, do so Are there any methods with static fields? I use it to inject the context in order to use it. Public Class MyClass {Private Provider & lt; Context & gt; ContextProvider; Remove the @Public MyClass (provider & lt; context> reference provider) {this.contextProvider = contextProvider; } Public doSomething () {reference c = contextProvider.get (); }}

ruby on rails - Update Controller of Devise -

I am using Devise in Rail app for User Auth. I have already created both registration and session controllers, but now I want a controller that simulates the def update from the draft. What is a way to access the controller using the devices to update the user? Yes, whatever you want to edit with sub-class users and with the updated operation, For this, registration is used by the controller, this sub-class controller has the default update action in it: Class User: Registration Controller & lt; Devise :: RegistrationsController def updates Self.resource = resource_class.to_adapter.get! (Send ("current _ # {resource_name}" .to_key) if resource.update_with_password (params [resource_name]) set_flash_message: notice, if_navigational_format update? Sign_in resource_name, resource,: bypass => right response with resource: Space = & gt; After_update_path_ (resource) other clean_up_passwords (resource) response_with_navigational (resource) {render_with_sco...

git - How to outsource with Github? -

I am working with a company that wants to outsource the development of new features on one of our projects is. We have a githab account and I am thinking that how can I give outsourced limited access to project repos on that account? Is there a way to limit the command and a specific set of credentials in a specific branch on a repo? I have heard about the throwing but have never really used it, is it what I am seeing? Update: After three years of working in the industry, it looks strange again on this question now. I had to learn a lot. Also, people are marking this post as off-topic, but I'm not sure when I originally posted it, then another appropriate stack exchange site was present. . However, as people have said that the outsourced project will work right to handle this situation. They will then make a bridge request, which I will have to review and approve it without giving them full access to our account. "post-text" itemprop = "text"...

Best IOS Memory management @ Function Call With Returning allocated object -

I have work with return type (NSArray / NSData / NSString / NSDictionary and so on) I can come back and I can also use it, but my problem arises to release the object. Please guide me what is the best way to manage the memory for the returned object. If anything is wrong then please note and give your best solution I refrared apple memory management guide a) - (NSDT *) Certain Functions 2 {NSDT * Data = [[[NSData Allock] Inte] AutoCare]; // nsdata Fill out the content for return data; } - (zero) some tasks {NSDT * data = [some associated with self 2]; // Usage Data} But the advice of most blogs to avoid AutoCalues ​​is because I am using the following type B) - (NSDT *) Certain Functions 2 {NSDT * Data = [[NSDTA Elok] Init]; // nsdata Fill out the content for return data; } - (zero) some functions {NSDT * data = [[self-resolution 2] is maintained); // usage data [data release]; } c) - (NSDT *) Some tasks 2 {NSDT * data = [[[NSDT allocon]]]]]]]; // nsdata Fill o...