Posts

Showing posts from January, 2010

Safari Extentions: Event for tab change? -

संभव डुप्लिकेट: मैं सफ़ारी में एक पृष्ठ पर एक पॉपअप रखने की कोशिश कर रहा हूं जो टैब-विशिष्ट है, और एक बटन द्वारा ट्रिगर किया गया (जो स्पष्ट रूप से टॉगल हो सकता है)। मैं कैसे सुनिश्चित कर सकता हूं कि जब कोई टैब चालू हो जाए, तो बटन को सही ढंग से टॉगल किया जाएगा, अर्थात पॉपअप दिखाई देने पर प्रकाश डाला जाएगा; अन्यथा नहीं। मैंने सुनने के लिए एक "टैब स्विच" प्रकार की घटना के लिए आस-पास देखा, लेकिन उसने काम नहीं किया और न ही फ़ोकस किया। कोई विचार? चीयर्स। क्रोम के विपरीत जो खिड़की और टैब परिवर्तन की घटनाओं के लिए विशेष एपीआई प्रदान करता है, आप अब भी इसे सफारी एक्सटेंशन के साथ कर सकते हैं। आपको अपने इन्सजेक्ट जावास्क्रिप्ट सेट ईवेंट श्रोताओं को उन घटनाओं के लिए रखना होगा जो आप चाहते हैं। तब अगर उस जानकारी को वैश्विक या विस्तार के अन्य हिस्सों से जरूरी है, तो आप पोस्ट मेसेज कमांड का उपयोग करके जानकारी को संदेश में दे सकते हैं। injected.js: window.addEventListener ("लोड", भरी हुई, झूठी); सफारी। स्व। Tab.dispatchMessage ("कुछ हुआ हुआ",...

jQuery submit workaround -

I found something interesting in jQuery, and I wanted to run it by some people which is better than I understand Is there a solution for that, so I want to post back the scroll position of the page when submitting all the forms on my page. I can do the following: $ ('form'). Submit (function () {$ (this) .append ('& lt; input type = "hidden" name = "Scroll_position" value = "' + $ (document) .scrollTop () + '" / & gt; ); Verification Back;} This works when users click or press on the Deposit Button, but there are times when I set a fire. () Event. Example: $ ('button') (function () {... / / here is doing something special ... $ (this) .Parents ('form') [0] Submit ();} How do I get my custom callback Whenever a page is submitted, it can still be called, even though a. () Call or user is submitting a form? Click the $ ('button'). (Function () {... // something is doing here .....

eclipse - Android Emulator Stuck Equals (=) Phantom Keypress -

For some reason, and only on my Del Vostro 1000 laptop, Android emulator thinks that I have the key = pressed And constantly "=====" emits a string of equal marks, it does not matter what I am doing in the emulator. It also responds with my manual keypresses, it does not matter who runs the Android system (2.1, 2.2, etc.) Surprisingly, this is a remote desktop session Also runs Android emulator where remote desktop client laptops and servers are running another PC emulator. If I run the emulator locally on other pc (not remote desktop), then the emulator function is okay! This problem did not arise when I first installed the SDK and by then I know that no other software has been installed since then. I tried clicking on "Clear User Data" from the emulator launcher and there is still no effect. I have tried to remove the SDK directory and have reinstalled it, but the effect is still there. Update: I have found another application that displays this behavior...

Easy creation of properties that support indexing in C# -

सी # में मैं अत्यंत उपयोगी खोजता हूं। उदाहरण के लिए: var myObj = नया MyClass (); मायओबज [42] = "हैलो"; Console.WriteLine (myObj [42]); हालांकि जहां तक ​​मुझे पता है कि क्षेत्र को समर्थन देने के लिए कोई वाक्यविन्यास चीनी नहीं है, जो स्वयं अनुक्रमण को समर्थन देते हैं (कृपया मुझे सही करें अगर मैं गलत हूं) उदाहरण के लिए: var myObj = नया MyClass (); MyObj.field [42] = "हैलो"; Console.WriteLine (myObj.field [42]); मुझे इसके लिए जरूरी कारण यह है कि मैं पहले से ही मेरी कक्षा में इंडेक्स प्रॉपर्टी का उपयोग कर रहा हूं, लेकिन मेरे पास GetNumX () , GetX () , और SetX () फ़ंक्शन निम्नानुसार है: सार्वजनिक int NumTargetSlots {get {return_maker.NumRefs; }} सार्वजनिक संदर्भ लक्ष्य GetTarget (int n) {संदर्भ ReferenceTarget.Create (_Maker.GetReference (n)); } सार्वजनिक शून्य SetTarget (int n, संदर्भ लक्ष्य आरटी) {_Maker.ReplaceReference (n, rt._Target, true); } जैसा कि आप संभवतः इन्हें उजागर कर सकते हैं जैसा कि एक अनुक्रमणीय फ़ील्ड संपत्ति अधिक समझदारी होगी। ह...

asp.net - Convert from Office Docs / PDFS to HTML -

I am currently working on a project where I have to secure access to downloadable files. The solution I want to apply is that each document has two buttons. One that says editable and others will work normally, with the opening of the browser dialog to open / save an editable document, they will look at either one or both of them (read based on users' permission) The read-only button needs to open the document without caching anything (without the temporary internet files) for security reasons on the client's machine or this Give the ability to save in your local machine. I have the best idea for this, to convert the document to HTML on the fly and then redirect the user to this page. Then we can stop caching on the site so that the HTML can not be cached (I know that they can right-click and save the HTML or make a copy of the text. But it has been considered acceptable. ) Does anyone have an alternative solution (or is this an easy way that can be achieved)? I do no...

Sharepoint: How to get value of custom columns -

I have a list with two new custom columns in SharePoint "First Line Pass" and "Second Line Pass" How to get the value of custom columns? I try this method: This column type is "Person or Group" and "Allow multiple selections" is set to "Yes". string name = item ["name"] as string; String ModifiedBy = item ["modified"] as string; String first lin epiv = = [["coming of first line"]] as string; String as string SecondLineApprovers = item ["Second Line Passwords"]; And for the first two columns, I get the correct value: "New text document. Txt" "1; #SHAREPOINT \\ Administrator" / Code> But for my new column I get null null but there are values ​​in this column! !! User user SHAREPOINT \ user2 SHAREPOINT \ user3 and "second line pass" " SHAREPOINT \ user4 What's wrong and how do I get the value of this column? "...

android - At the time of button click open another one application? -

मेरे पास दो अनुप्रयोग हैं I ApplicationA और ApplicationB । ApplicationA से मुझे ApplicationB खोलना होगा। उसी समय मुझे ApplicationB को कुछ विवरण भेजने की आवश्यकता है। यह कैसे करें? आप इसे सिर्फ एक पंक्ति कोड लिखकर इसे कर सकते हैं आशय mIntent = नया आशय (यह, "com.urproject.urclass.class जैसे दूसरे एप्लिकेशन पैकेज का नाम यहाँ"); कुछ विवरणों को भेजने के लिए आप बंडल का उपयोग कर सकते हैं या साझा किया जा सकता है या क्लास के नाम का उपयोग करके स्थिर और ऐक्सेस घोषित कर सकते हैं। बंडल एक्स्ट्रास = एमआईएनेंटेंट। ); Extras.putString (कुंजी, मान);

java - How to use Neo4j BatchInserted nodes after they have been created and indexed? -

I am using the Batch Indsarts and the Luceneindexback Inser API to make my article (~ 10000 nodes for now). The thing is that the batch insentrator node (...) is a long Batch Insertor Insertor = New Batch Instifier IMPL (DB_PATH, Batch Insertor Impressor Load Properties ("NEO 4J.Prop" )); Long node = inserter.createNode (properties); Where the property is a map (string, object). I really need to get a new node of the node. node node = inserter.createNode (attribute); In this way I can use the lowest path API and can pass in a start node and target node. So, basically, is there no place that I can get a node from the index as a node and not long? It may be that someone can tell why the batch insentor returns a node type type instead of type node? Hope it makes sense to anyone, thanks. The batch inserter is not intended for general use; only If you look at it, you will see what you do when you use it for long while creating relationships: Insert d...

best way to configure Springsource Tool Suit (STS, eclipse) to work with grails -

I'm looking at the best way to get Eclipse or configure STS to work with Grails. I'm working with version 2.3.2. I have tried to set up the cellpath correctly to install this plugin: In addition to this. But I have many problems: Autocomplete Multiple synchronization errors (according to STS, not for Gels) There is no syntax highlight for GSP files. It is CTRL + SPACE: "Missing autocomplete" Project view plugin looks awesome with all links in source path So I'm thinking: is this the best way to configure it? Do you have a better way? The best way to work with artificial limbs lets you collect all the tips and tricks to configure the STS. Thanks in advance I use the M2 version of 2.3.3 I've been there and there have been major improvements on previous versions of Grails and Groovy support.

Convert zip file timestamps to human readable format -

For files in a zip file, how to change the last modified date and time of the file after converting to a human readable format is? I have found it! Timestamp of the zip file How can I change the FAT timestamp in the same format on or other stack overflow question:

sql server - How to dispatch thousands of SQL requests asynchronously -

हम एक साधारण अनुप्रयोग लिख रहे हैं: हजारों एसक्यूएल चयन बयान Sp_who2 द्वारा सत्यापित), या सिर्फ एसक्यूएल क्वेरी की तुलना में पूरा करने के लिए अधिक लंबा समय लेता है (शायद किसी तरह की गतिरोध?)। हम हैं: कॉलबैक हैंडलर में एंडएक्सक्वायर्थ रीडर को बुला रहा है। conn.close () और conn.Dispose () कॉल करें एक दूसरे कॉल को फिर से शुरू करना सार्वजनिक स्थिर शून्य प्रारंभिक () {// सरणी के लिए क्वेरी का निर्माण [i] // ... SqlConnection conn = new SqlConnection (AsyncConnectionString); conn.Open (); सीएमडी.बीजिनएक्सक्वायर्थ रीडर (कॉलबैकहैंडलर, सीएमडी); i ++; } सार्वजनिक स्थिर शून्य कॉलबैकहैंडलर (IAsyncResult एआर) {// सीएमडी सीएमडी खोलें। ENDExecuteReader (); // किसी DataTable में कुछ सामान पढ़ें ... // SqlBulkCopy एक अन्य डेटाबेस (सिंक्रोनस) cmd.Connection.Close (); cmd.Connection.Dispose (); StartQuery (); धन्यवाद P> मुझे लगता है कि आपने कनेक्शन स्ट्रिंग पर सेट किया था। सीएलआर में जमा किए जाने वाले हजारों शुरूएक्सएक्टेक प्रश्नों को आपदा के लिए एक नुस्ख...

Java insuring that an object passed to a method extends a given class -

What would be the best way to increase the given class to pass an object in an object? At present, I have a method that takes a bytebuff data to send and a 'Player' class I wrote, and data queues on the IO server sent to the customer: sending a public Zero (BitBuffer Sedned, Player Player) {// Submit a byte buffer to send prepaid, and it queue on the Io server) I What do I want to be able to do in the player object Put Bjekt that player enhances the class. I did some searches and found something like this: to send public zero (send bytebuffer, player> player increases; player) {// to submit Byte buffer rendering, and in line it is IO server} but it is compiling errors to me, and I do not understand exactly what is going on. What would be the proper way to do this? And if so, then someone can explain what this code is doing specially and why it is not working or is linking me to an article which tells it in more detail. Alternatlly, I think I can set it so...

python - How do I force Django to ignore any caches and reload data? -

I am using a Django database model from a request that is not asked by the HTTP request. This process should be voted for new data every few seconds and some processing should be done about it. I have a loop that sleeps for a few seconds and then receives all uncontrolled data from the database. The one I see is that after getting it first, the process never sees any new data. I have run some tests and it seems that the Django result is caching, even if I am creating a new query set every time. To verify it, I did it by opening a Python: gt; & Gt; MyModel.objects.count () 885 # (Here I've added some more figures from the second process.)> Gt; & Gt; & Gt; MyModel.objects.count () 885 & gt; & Gt; & Gt; MyModel.objects.update () 0 & gt; & Gt; & Gt; MyModel.objects.count () 1025 As you can see, adding new data does not change the result count. However, when calling the update () method of the manager, it seems to fix the problem. I d...

Excel 2007 returns `Application-defined or object-defined error` -

मेरे पास Excel 2007 और Windows XP है जब यह कोड चलता है: कॉलम ("ए : जी "।) ActiveWorkbook.Worksheets का चयन करें (" Sheet1 पत्रक 1 ") Sort.SortFields.Add कुंजी।: = रेंज (" ") Sort.SortFields.Clear ActiveWorkbook.Worksheets (।" बी 2: B20000 ") _, SortOn: = xlSortOnValues, आदेश: = xlAscending, DataOption: = xlSortNormal ActiveWorkbook.Worksheets ( "Sheet1") Sort.SortFields.Add कुंजी:। = रेंज ( "A2: A20000") _, SortOn: = xlSortOnValues, आदेश: = xlDescending, DataOption: = xlSortNormal ActiveWorkbook.Worksheets ( "Sheet1") Sort.SortFields.Add कुंजी:। = रेंज ( "F2: F20000") _, SortOn: = xlSortOnValues, आदेश: = xlDescending, DataOption: = xlSortNormal ActiveWorkbook.Worksheets के साथ ( "Sheet1 ") .Sort .SetRange रेंज (" A1: G20000 ") .Header = xlYes .MatchCase = झूठी .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply Application.Calculation = xlCalculationAutomatic यह पर एक त...

objective c - object_setClass to bigger class -

I am changing the class of some objects by using the object_setclass (id object, class class) I am changing the class to a subclass of the original class. I then set some properties which are defined only on the subclass, and things work fine. I was a little surprised that this works, because object_setClass , as far as I understand, does not re-specify the object, it is only isa Pointer changes if sub class examples are much higher (i.e., many more earners) compared to the example of the original class, so I do not think how the object can work as expected. Does this work only because there are so many buffer memory (due to alignment etc) between objects in memory? Is it strong, or in some circumstances can this accident occur? This may crash as if it can be seen in the source code of the runtime, it is actually only isa swaps the pointer If you really want to swap the isa in the isa of a subclass with more code If you want, you should use nonzero with a...

c# - What is the difference between i++ and ++i? -

इस सवाल का पहले से ही एक उत्तर है: 21 उत्तर मैंने उन्हें दोनों को देखा है सी # कोड के कई टुकड़ों में इस्तेमाल किया जा रहा है, और मैं यह जानना चाहता हूं कि i ++ या ++ i ( i का उपयोग करते समय) वैरिएबल जैसे int , float , डबल , आदि)। कोई भी यह जानता है? अजीब तरह से ऐसा लगता है कि दूसरे दो जवाबों की वर्तनी नहीं होती है बाहर, और यह निश्चित रूप से कहने लायक है: i ++ का मतलब है कि मुझे i का मान बताएं, फिर वृद्धि करें ++ i अर्थ 'वेतन वृद्धि i , फिर मुझे मान बताएं' ये पूर्व-वेतन वृद्धि, वेतन वृद्धि ऑपरेटरों के बाद दोनों ही मामलों में वैरिएबल बढ़ जाता है , लेकिन यदि आप समान ही मामलों में दोनों एक्सप्रेशंस का मान लेना चाहते हैं, तो परिणाम भिन्न होगा।

c++ - When Does Visual Studio 6 Catch Structured Exceptions? -

It's mostly curiosity, but I'm reading about the history of Visual Studio CH exception to C ++ Trying to create a try I have been claiming that the old version of Visual Studio, which was enabled with the / GX flag, protected "some time" in a C ++ hold block Win32 can catch exceptions Under what circumstances created with the Visual Studio 6.0 / GX flag On the go, enter the catch block in the following code? char * p = null; Try {* p = 'A'; } Hold (...) {printf ("catching \ n"); } Visual Studio 6 + SP6 prevents programmers with a pseudo-exception in their simple tests and is not printed in "grip", however, some articles (eg A) Let me insist that it is possible to enter the hold block. int main () {__try {int * pInt = NULL; * PInt = 0; // Enter any exception exception} __exapter (EXCEPTION_EXECUTE_HANDLER) {DWORD dw = GetExceptionCode (); Switch (dw) {case EXCEPTION_ACCESS_VIOLATION: Cot & lt; & Lt; "Acc...

php - echo the contents of a File to the user but make it act as a download -

I have a script where I get the contents of a file and then it resonates on the screen, the problem is that An example of a binary file on the page, what should I do if it works like a download where the download dialog will appear. How can I get it? From the PHP manual: // We have a PDF header output ('Content-type: app / pdf'); // it will be downloaded .pdf header ('content-dispute: attachment; filename =' downloaded PDF ''); // pdf source is in original PDF readfile ('original PDF'); Change the content-type and file name. You can readfile the user on file_get_contents, but either work or

debugging - On Ruby on Rails, how do we print debug info inside of a controller? -

In PHP, CGI, or ROR view, we can print debug information easily. How about the controller, how can we say, print "Hello World" (in webpage output) and return to continue with the view, or there the controller can turn it there. Are you You can: render: text = & Gt; @ Some_object.inspect but your view will not be provided. You can also: Rails.logger.debug ("My Object: # {@ some_object.inspect}") Run tail on log / development.log to see more output. The recommeneded path is in this view:

How can I define an Order parameter through a belongsTo table in Castle ActiveRecord -

Hi guys take a look at the following unit: Produto = Product (in English ) [ActiveRecord ("produtos", lazy = true)] Public partial category Produto: ActiveRecordBase & lt; Produto>, IObjetoEntidade & lt; Produto & gt; {[Primary KEY (Primary Katie Type Native, "Prod_ID")] Public Virtual Entity ID {Receipt; Set; } [String longitude editor (0, 100)] [property ("prod_descrow")] public virtual string descricao {get; Set; } Related ("prod_grupop_id", lazy = Fetch.When.OnInvoke)] {Received Public GrupoProduto GrupoProduto { Set; } See Grupoproduto is like a box when I try to put it in an order parameter, the castle throwing the exception can not find property. I am creating the follwing code: isolated syrityia dc = isolated canere For & lt; Produto & gt; (); DC satfetchode ("GroupProduto", NHibernate.FetchMode.Join); Return SlicedFindAll (Praimro Rijistro, Kwantidade, DC, new [] (order. ASC ( "Grupoprod...

design - Client/Server are always separated! Or are they? -

How many programmers are there in more community of programmers, such as "How do I backend EXTJS?" Or "How do I integrate Java with Java?", Not understanding the difference between the client and the server. So I started thinking, is there frameworks where the server actually sends something to execute JS or the client? What are the philosophical views around such an approach? Edit - To clarify: I am asking, what is possible, I am asking if it has a good strategy or is stuck on it. I'm not asking that client-side languages ​​can run on the server. I'm asking that there are frameworks for the dynamic client side code to serve dynamically. Many different frameworks do this, when you do ASP.net, you can By looking at the postback call in the client, this is generated by the framework and there is a JavaScript call in the Java world, most JSF frameworks come to a more or a lesser extent on this. Unless you remember the "do not trust the client...

What's the startup sequence for Emacs? -

I get .emacs, and ~ / .emacs.d / init.el. What are those files / directories for? What is the startup sequence of Emacs? Is there any way to emacs ~ / .emacs.d? does not read emacs -c or emacs --no -init-file can not read emacs to the ~ / .emacs file. Do not try to read ~ / .emacs.d if there is no ~ / .emacs file, if there is no ~ / .emacs file then it will read ~ / .emacs.d / init.el for more information. Look for information on startup.

Storing dynamic lengths of time on the database in ruby on rails -

ठीक है, तो मुझे इस तरह से कुछ चाहिए: time_span = "1.month" Date = dateTime.now date = date + send ("# {time_span}") जहां time_span को वास्तव में डेटाबेस पर संग्रहीत किया जाता है, लेकिन वह काम करने में प्रतीत नहीं होता .. यहाँ कुछ है कंसोल कार्रवाई: $ रेल c & gt; & gt; टाइम_स्पेन = 1.month = & gt; 1 महीने का & gt; & gt; तिथि = दिनांकटाइम। अब + टाइम_एसैन = & gt; शुक्र, 27 अगस्त 2010 20:51:18 -0500 & gt; & gt; Time_span.class = & gt; फिक्सनम & gt; & gt; Time_span = '1.month' = & gt; "1. महीने" & gt; & gt; दिनांक = दिनांक समय.नाना + टाइम_स्पेन प्रकार त्रुटि: अपेक्षित संख्यात्मक रूबी / 1.8 / दिनांक.आरबी: 1236: `प्लस_विभिन्नता 'की तारीख / गणना। आरबी: 87: में से` +' में (आईआरबी): 5 यह विचार है कि मुझे 1. महीने को डेटाबेस में एक स्ट्रिंग के रूप में संग्रहित करने की आवश्यकता है क्योंकि एक महीना के रूप में 1.month को संग्रहीत करता है केवल उस विशेष महीने में सेकंड की कुल संख्या को...

iphone - How to autorotate UIScrollView and UIImagewView programatically? -

I have a UIScrollView and a UIImageView, which I have created without any interactive builder program, how can I make sure That auto-rotate both horizontal orientation? If you are subclassing UIViewController, even programmatically, Should just be sure to set the autresizing mask on the scroll view and the image view so that the mask is set to UIViewAutoresizingFlexibleWidth. UIViewAutoresizingFlexibleHeight If you want to optimize new screen dimensions.

vector - How to achieve 'donut holes' with paths in Raphael -

I would like to attract the shape in which it may have holes, like I fill it Give shape and do not keep holes filled with that color (leave them transparent). According to : The compound path (i.e., a path along many episodes) is possible that objects like "donut hole" are allowed. Can anyone give a very easy example to do this with a vector path? Thank you very much. If you know the trick then it will be quite straightforward. For example: paper. ("50 50 50 50 150 L 150 150 150 150 150" + 75 75 75 75 75 75 125 125 125 125) Atter ("Filling", "#FAF"); but *: paper. ("M 50 50 L50 150 L 150 150 150 150 150 150 150 x 150", "7575", "75"; The difference is that in order to reveal the path within the donut, it should be the upper boundaries drawn in reverse order by the outer path (i.e. drag a clockwise ), Other anti-clockwise). (*) At least, it works in Chrome, Opera and Firefox 4.0 Beta, b...

c# - SelectGroupByInto is not grouping! -

I am trying to use a column to group a dataset. What I am doing: Dataset ds_tmp = new dataset (); Datatelle dt_tmp; Ds_tmp.Tables.Add (data_table_UserTime); DsHelper = New Dataset Helper (Ref DSI_TTP); Dt_tmp = dsHelper.SelectGroupByInto ("UniqueUsers", ds_tmp Tables [0], "Users, zodiac (time) total time", "time"; "0", "user"); data_table_UserTime is something like this: Users ------ Time John ------ 0.6 Mark ------ 1.2 Paul ------ 7.1 John ------ 52.6 John - Paul ------ 50.3 Finally, should be dt_tmp : User ------ Time John ------ 54.0 Mark ------ 1.2 Paul ------ 57.4 But what do I get: Users ------ Time John ------ 0.6 John ------ 52.6 Jaw ------ 0.8 Mark ------ 1.2 Paul ------ 7.1 Paul ----- - 50.3 It seems that this amount is not (time). What's going on? Thanks in advance. Wow, I never imagined that this dataset would be a bug in the Halper class. ...

iphone - property not being recognized in view controller -

मेरे पास एक NSNumber संपत्ति के साथ कस्टम NSObject है मैं इस प्रॉपर्टी को सेट व्यू नियंत्रक में सेट करने और याद रखने की कोशिश कर रहा हूं जिसमें कस्टम ऑब्जेक्ट के हेडर शामिल हैं I हालांकि, दृश्य नियंत्रक "संरचना या संघ में कुछ" के रूप में संपत्ति को नहीं पहचानता है मैंने एक ही कस्टम ऑब्जेक्ट में NSString संपत्ति की तरह यह NSNumber संपत्ति का इलाज किया है I स्ट्रिंग के साथ मैं इन प्रकार की त्रुटियों को प्राप्त नहीं करता। यहां कस्टम ऑब्जेक्ट के हेडर हैं: @ इंटरफेस इंडियंसटैब: एनएसओब्जेक्ट {एनएसएमयूटीएबलएआरआरए * मद लिस्ट; NSString * personsName; NSNumber * कस्टम टिप; } @ प्रॉपर्टी (नॉनैटोमिक, रिटेन) NSMutableArray * itemList; @ प्रॉपर्टी (नॉनैटोमिक, बनाए रखना) NSString * personsName; @ प्रॉपर्टी (नॉनैटोमिक, रिटेन) एनएसएनम्बर * कस्टम टिप; व्यू नियंत्रक में उपयोग का एक नमूना यहां दिया गया है: व्यक्तिटैब * thisTab = [self.listOfPeople ऑब्जेक्टअटइंडेक्स: (tipBeingEdited - 20)]; ThisTab.customTip = tipRate; यह अंतिम पंक्ति मुझे एक त्रुटि देता है हालांकि, thi...

objective c - Sms service in iphone -

क्या आईफ़ोन 4.0 समर्थन एसएमएस सेवा है ?? हाँ क्लास का उपयोग करें (अपने प्रोजेक्ट में MessageUI फ्रेमवर्क को भी जोड़ना सुनिश्चित करें)।

sizeof(void) equals 1 in C? -

संभव डुप्लिकेट: हाय सब! मैं अपने सी कार्यक्रमों को संकलित करने के लिए जीसीसी का उपयोग कर रहा हूं, बस गलती से पता चला कि sizeof (शून्य) सी में 1 बाइट है क्या इसके लिए कोई स्पष्टीकरण है? मैंने हमेशा इसे शून्य बताया (अगर यह वास्तव में कुछ भी नहीं स्टोर करता है)! धन्यवाद! यह जीसीसी के एक गैर मानक एक्सटेंशन है, लेकिन इसका तर्क है जब आप पॉइंटर अंकगणित जोड़ते हैं या एक इकाई को हटाते हैं तो वस्तु को जोड़ने या निकालने का मतलब है आकार। इस प्रकार sizeof (शून्य) को परिभाषित करना 1 के रूप में void * परिभाषित करने में मदद करता है एक बिंदु के रूप में बाइट (untyped स्मृति पता) अन्यथा आपको पॉइंटर अंकगणित जैसे p + 1 == p का उपयोग करते समय आश्चर्यजनक व्यवहार होता है जब पी शून्य * होता है। मानक तरीका उपयोग करना होगा उस प्रकार के प्रयोजन के लिए `चार * (पॉइंटर टू बाइट)।

castle activerecord - Avoid first level cache for an entity in NHibernate? -

I have a unit that is updated externally (triggers, using stored procedures) that means The unit can change in a single session without its knowledge, and it is necessary for me to always kill a database, and never use the unit from the first level cache. Is it possible NHibernate (or indeed, the Castle Active Record)? To disable a IStatelessSession first level cache in you ISession instead of (ISessionFactory sf = cfg.BuildSessionFactory ()) (iatatale session session = sf.OpenStatelessSession ()). }

x11 - Open applications in different workspaces in Gnome -

Given that I am a lazy bastard, I tried to write a bash script which is a few daily in different desktops The app opens once. This script should work in the genome I have written so far: #! / Bin / bash Firefox & amp; Thunderbird & amp; / Usr / bin / netbeans --locale en & amp; Amsn & amp; Gnome Terminal & amp; Sleep 2 wmctrl -r firefox -t & amp; amp; Wmctrl -r Netbeans-T1 & amp; Amp; Wmctrl -r Gnome Terminal -T 2 & amp; Wmctrl -r amsn -t 6 & amp; Amp; Wmctrl -r Thirdbird-T7 However, it does not work, my apps are open, but they will not be specified on the desktop that I have specified: (. EDIT: I changed the value of sleep to 15 ... Only Firefox and Netbeen are correctly assigned, the rest opens in the workspace from which I execute the script ... checkout, this window Look at the creation of them. Work them accordingly. Devil's pie can be configured to detect windows, as they have been made, and match according to the rules o...

java - Apache POI HWPF - problem in convert doc file to pdf -

I am currently working with the Java project to use Apache Poison. Now in my project I want to convert the doctor file into a PDF file. The conversion was successfully completed but I will not only get the text in PDF, not text text or text color. My pdf file black & amp; White. While my doctor file is painted and has different style of text. This is my code, POIFSFileSystem fs = null; Document document = new document (); Try {System.out.println ("Begin Testing"); FS = new POIFSFileSystem (new file inputstream ("/ document / test2.doc")); Hppf document doc = new hppf document (fs); WordExtractor We = New WordExtractor (Doctor); Outputstream file = new file optest string (new file ("/ document / test.pdf")); PDF Author Author = PDFDriver.Testence (document, file); Range range = doc.getRange (); Document.open (); Author.setPageEmpty (true); Document.newPage (); Author.setPageEmpty (true); String [] paragraph = we.getParagraphText (); For (int i ...

asp.net - Property from a custom UserControl that is saved in viewstate loses its value -

I have a custom control in the ASPX page in which size is the property named public int Size {get {return Convert.ToInt32 (viewstate ["Creative Size"]); } Set {ViewState ["Creative Size"] = Value; }} This property is set for a value in the aspx page, which tells 500 during a postback, through a button control which is in the page (not in the custom control) is. I also have a button inside the custom control that raises a postback like this secure void btnUpload_Click (object sender, EventArgs e) {if (fuBannerfile. HasFile) if (FuBannerfile.FileContent.Length / 1024> this size.); // code is not important here When this event is called "this.Size" property 0. I also viewed during debugging of page's page_load, if I like this I use the property of: int size = customControlId.Size; The property is set to 500. But then when the debugger reaches the incident within control then the asset is 0. Why is this happening to any idea, o...

objective c - How can I use a nullable int or a NSInteger pointer? -

I have not been set already, so it needs a value to calculate in the getter method I I like to use the nullable int build, so I do not need another bool to check that it has already been done. My first bud was to go for a NSInteger * I can check whether it is a tap and otherwise there is a value set for it but I do not know if it is possible That's because I can not really get the value assigned to it. if (! Value) {value = [self calcValue]; } return value; It leads to P> I How do I specify a int as a nsinteng * ? How do I put a NSInteger * to a ? A NSInteger is actually a int . You are searching for NSNumber , which lets you treat numbers as objects.

sql server 2008 - Must declare the scalar variable "@unwantedRows" -

Why is this question not working? Delete tblProduct from tblProductInner Join @Unvanced Rows On TblProduct.ProductId = @Unfortunately, Manufacturer; Where @ inventedRows is announcement @ unverified ROS table (Product Id INT, Product Name VARCHAR (50), Description VARCHAR (50), category VARCHAR (50), duplicate int); You can not use the variable name to join in this way. Try: Delete tblProduct from tblProductInner Join @Unvanced Fury as tblProduct.ProductId = u.ProductId;

colorbox check parent element exist -

I am using colorbox to open a window that shows a grid with categories to select the check box After, I attract categories on the parent window. So far good. My problem is that before I check that the category exists in the original window, but it is not working if ($ ('# cat- 2 ', window.parent.document) .length == 0) $ (' # categories', window.parent.document) .append (newdata); Am I missing something if ($ ('# Cat-2', window.parent.document) Length == 0) is saying "# cat -2 no do something while it is present". Probably only try if ($ ('# cat-2', window.parent.document) .length)

c# - Lambda expression weirdness in a LINQ to SQL 'where' condition -

I am working on an application that uses repository patterns with my data source. In my repository I expose the following method: public IEnumerable & lt; T & gt; Find (convert & lt; Func & lt; T, bool & gt; & gt; ou)) Returns _ Convert GateTable & lt; T & gt; (). Where (where); } I am able to call by saying: repository & lt; Users & gt; (). Find (U => true); But if I'm trying (when the search is zero) the repository & lt; Users & gt; (). (U = & gt; String.EasanOrcti Search)? U.UserName.Contains (search): true); I get an error: The value can not be empty The parameter name: text I thought That Lambda's expression will execute the same thing because the value of search is zero, but this is not clearly the case. How do I fix this problem? To add to other answers, if you is adhering to this ideal To do this, you can do so instead: repository & lt; Users & gt; (U => String.Esan...

android - Instantiating activities into new tasks and processes -

I have an application with a multi-instance activity. I have used every example of the activity new function And would like to appear in the process. Any suggestions on how to do this? By manipulating manifold, I can cause a special task and all instances of the activity appearing in the process, but I have not found any such way in which each example is Different work and process (The need to do different tasks is that we want each instance of activity to appear separately in the job list; the need for different processes is that every instance of the activity is with the global state One part of the original code is supported, we can not change any of these.) Well, You can use it but the documentation is very clear that you Could should not use it to use. It's possible that you can end up with a group of activity that the user does not have any way to get back. I suggest that the architecture of your app may again be that you can store the link in the local...

asp.net - Good way to split data into two side-by-side HTML tables -

असल में, इस तरह दिए गए डेटा: कर्नल 1 | कर्नल 2 1 7 2 8 3 9 4 10 5 11 6 12 मुझे पृष्ठ को ऐसा कुछ दिखाना है: कर्नल 1 | कर्नल 2 कर्नल 1 | कर्नल 2 1 7 4 10 2 8 5 11 3 9 6 12 पाठ्यक्रम का उद्देश्य यह है कि मेरे पास कम ऊर्ध्वाधर स्थान के साथ अतिरिक्त क्षैतिज स्थान है। जाहिर है यह किसी रॉकेट वैज्ञानिक को इसे बंद करने के लिए नहीं लेता है, लेकिन मुझे लगता है कि मैं अपने खुद की तुलना में एक क्लीनर / आसान समाधान खो सकता है, शायद सीएसएस या मौजूदा एएसपी.NET नियंत्रण के चालाक उपयोग यह एक सामान्य पर्याप्त आवश्यकता की तरह लगता है, लेकिन मुझे खोज के लिए खोज करने के लिए खोज शब्द बिल्कुल नहीं मिल सकता है। अग्रिम धन्यवाद। आप दो टेबल प्रदर्शित कर सकते हैं जो परिणाम प्रदर्शित करते हैं, और उन्हें फ्लोट विशेषता का उपयोग करके किनारे रख सकते हैं? .table_left { बाईंओर तैरना; } .table_right {float: right; }

objective c - iPhone app: How to display formatted text? -

I need to display some simple formatted text inside a small part of a scene. Background background should be transparent because Background background image. How should I go about this? Could the web view control move? Thanks a UIWebView with a transparent background, should actually do the trick You can use something like: UIWebView * formatted text = [[UIWebView alloc] initWithFrame: CGRectMake (0, 0, 200, 50)]; [Formatted Text Load HTML String: @ "My & lt; strong & gt; formatted & amp; lt; / strong & gt; text" baseURL: zero]; Be careful though: UIWebView s are heavy objects that suck lots of memory, as well as they can take some time to load and render your text. You should release your label as soon as you do not need it.

java - How do I use ASCIIFoldingFilter in my Lucene app? -

I have a standard Lucene app that searches from an index. There are so many French words in my index and I am using ASCIfolding filters. Want to use I have searched a lot and I do not know how to use it. The constructor takes a tokenstream object, will I call that method on the analyzer which gets the flow of the flow when you send it to the field? So what do I do? Does anyone point me to an example where a token filter is being used? Thank you. token filters - such as ASCIIfolding filters - have a tokenstream based on them, so they are some of the analyzer main Uses the following method from: public abstract TokenStream tokenStream (string field, reader reader); As you have seen, the filters take a tokenstream as an input. They work like wrappers or more correctly, as if their input means that they increase the behavior of the token stream contained, display both their operation and the inherent input operation. You can get an explanation. It is not directly focusin...

sql server - Date serial in SQL? -

how do I one day [1-31] ​​and one month [1-12] and one year (all int) Can I change? A date serial in these SQL (without converting into varchar)? Zero 1 January 1900 is in SQL, so you can use it: DATEAD (day, @delge -1, DATEADD (month, @ month-1, DATEADD (year, @ year-1900, 0))

jquery - Display default icon, and replace icon if class is set on div -

I want to create a div tag with an icon on the left, and some text. Now, if there is an incident, by using jquery I am adding a square to this div tag so that the icon is replaced with another icon. I have jquery side of things, but I'm not sure how to do this through CSS. My CSS: & lt; Div id = "tag-user" class = "usertag select" & gt; Some tags are & lt; / Div & gt; .usertag {background: url ("/ images / tags") no-repeat;}. Set. Selected (background: url ("/ images / tag-selected"); no-repeat;} The image is not showing, so I think my CSS is incorrect. You have a space between your class name, it should be .usertag.selected the same element as the selected On .usertag. .sertag matches the elements with the selected elements An R .usertag. Be aware that multiple class selectors, that is, do not work below 6. And if you need compatibility with downlabel browsers then consider applying for user...

javascript - Can I use a variable to pass a json string? -

यह कोड काम करता है: $ (this) .load ($ ('। Pageloadlabel ', यह) .attr (' href '), {श्रेणी: 1}); यह कोड काम नहीं करता है: var डेटा = '{श्रेणी: 1}'; $ (यह) .लोड ($ ('। Pageloadlabel', यह) .attr ('href'), डेटा); सवाल यह है, मैं यह कैसे काम कर सकता हूं? आपका डेटा एक जावास्क्रिप्ट ऑब्जेक्ट नहीं है, लेकिन एक स्ट्रिंग है, आप इसे eval जैसे ऑब्जेक्ट में परिवर्तित कर सकते हैं उदा। data = eval ('(' + data + ')'); लेकिन eval को खतरनाक माना जाता है, JSON जैसे डेटा = JSON.parse (डेटा) JSON lib के लिए आप का उपयोग कर सकते हैं

security - IE secure and unsecure items issue -

I'm trying to get rid of error pop-up window that appears in IE "safe and non in page -Safe items "I've ensured that all links are pointing to https: // instead of http: // I have also seen that all requests are being made on https: // links, this Wisdom and fireblog logs are seen to be viewed. Here is a question that: SO: The person whose answer was accepted was correct on the target. I want to know how I was debugged to reduce that solution? Any help is appreciated. Thanks You actually load a resource to trigger the warning There is no need to do, a reference takes everyone & lt; used to load the flash applet. Object & gt; is enough (if you refer to HTTP URI for Flash plugin). The easiest thing is to search for 'http:' with the source and your editor. If it does not start at all, then document.getElementsByTagName ('html') [[0]. Do the same with the production of. WinnerHTML .

c# - Getting a line # and proc name in asp.net -

I am writing an error log process (for security reasons I could not use log4net / elmah etc), And I want to know whether it is possible to get the line number of the line, where the error occurred and / or the process name where the error occurred? I will endeavor to capture the statement block, so I hope the error handler (or error due to that line) and related process name to get the line number hold (exception e) {string string errmessage = e.message string errorsTraceDetails = E.StackTrace } This should give you the necessary details.

java - JSF2: navigation flow question -

I'm not sure what I want, but it is worth trying to ask. Suppose I have 2 pages: List.jsf and CreateNew.jsf . list.jsf from the data source & lt; P: dataTable & gt; Display data as . Enter a new entry in the CreateNew.jsf data source what I want to do with CreateNew.jsf , when I click on the generated, it's a new database Returns the entry, then return to List.jsf , but refresh yourself at List.jsf at this point so that new entries can also be displayed. Is it possible to achieve this? Value for couple things: Managed bean for List.jsf is managed for session squad and CreateNew.jsf RequestScoped Handle in the navigation flow within faces-config.xml . or @ session-scod bean list.jsf to @ViewScoped so that there is a new creation, in @ManagedProperty or @SessionScoped Add a method as the bean reload list () Code> @RejectScoped and let it call the method after creating a new entry.

clojure - Trouble with this macro -

Shocking enough, I'm having trouble designing this macro correctly. The macro is as I wrote: (defmacro construct-vertices [xs ys] (opposition 'draw-line-strip (map # (list top% 1% 2) xs ys))) It needs to be in two collections or seqs, xs and ys , and I need it ... (draw-line-bar (top 0) (top 1 1) (top 3 3) (top 5 6) (top 7 8)) ... of New xs = [0 1 3 5 7] and ys = [1 1 3 6 8] . This works fine if I have my macro plain 'n' simple vectors (like [1 2 3 4] and [2 3 4 5] ) but if I give it a lazy-seq / anything that is evaluated like (take 16 (repeating # (+ 0.1% 1)) does not work 0)) And (16 (cycle [0 -0.1 0 0.1])))) . I realize that this is because this macro is unchanged, and so I am getting it, for example, (take the top) as my first result (I do believe). Unfortunately, I have tried to evaluate all of them first and then failed / failed to issue my macro-rearlit. I am sure that I am missing some basic syntax - quotation / landing...

contextswitchdeadlock - c# winforms in the debugger.... context switch deadlock detected -

So I'm running a unit test, this is a "bad" unit test that is long Time to run (which used to work just fine) Now I have detected the reference switch deadlock, getting the error, I'm feeling because this long process (20 minutes) is. is very similar to the one described here: Anything can I do to run the unit test without error? If there is nothing else, then I can remove it from the test and write the Lifel cover app, but we do these tests only once or twice, and it looks like lots of work Thanks, Cal- As Hans has said, if you run unit tests that are slow, it works instead of debugging them thanks, e - Okay.

flash - how to make button click event to call a function which set another label text? -

I am not an action script developer and flash designer, I just want a small action script sample which I call it my javascript code Very little to talk with By the way, I have to put a button and a label on the flash button, when the user clicks on this button, the onclick event will set another function 'settext example 'Setteext () function for the label text Do Riwartit. So I think the code would look something like this: button_click () {setText (); } Zero set text () {label1.text = 'hi'; } I have been successful by putting buttons and labels, I just want this code that I will write to do this work. var btn: movie clip; // your button reference btn.addEventListener (MouseEvent.MOUSE_DOWN, onBtnMouseDown); BTnmusDown (E: MouseEvent) on function: zero {setText (); } Function setText (): zero {label1.text = 'hi'; }

api - How do Rails and Jruby relate? -

Background: I have a Java Library which is accessed by many developers - usually via Java. However, some god expects that it can be used through the Ruby API. To implement the Java-Ruby API, I am gravitating towards the direction of the jarbelli. Question: My main concern is that these developers will not be able to use APIs at present, rail development infrastructure But Ruby; But instead of working within the Rail environment of the Jersey bus. Is this the case? Maybe I can not find the connection between the railways between Jerubi and Ruby. But it seems that you can work either in the railroad, or work in JRUB's railroad - is it technically two different development environments? I appreciate any light that sheds light on it. Edit : Forcing Developers Doing really (to be more specific to customers) is not really an option to make big changes in your projects to stay with this API. So, if the railway app has to be converted to JRB on Rail app, then maybe so...

Writing Unit Tests in ASP.Net MVC with Code-First and EF4 and SQL CE4 -

I am reading Scott Gujarat's post on the first design of code with ASP.Net MVC 2.0 and EF4: In the post, he uses the SQL CE4 database and 'Seed' test data for development. My question is related to the test. It is widely believed that we should not write a 'clean up' code for reasons such as speed against a database and do not test to eliminate errors from the database. If we use SQL CE4 thanks thanks P> I still use the memory store to check the SQL CE database instead of testing your preferred method) when you have full SQL There is not a chance to mess up against the server, even then, you believe that windows will not have any problem accessing the database file at any time. Any error reaching SQL CE at that time can cause all your tests to fail. There is less chance of having a problem in the memory store.

c# - Linq List comparing -

Linux is great, but it's always confusing me a bit. This is my latest confusion: Say I have two list & lt; String & gt; We can call them sourceList and destList . I need to find the list of stars in the source list and neither the list of stars in the disistist which are in the list and not in the source list. This is a bit confusing, so this is the example: sourceList destlist Orange Apple Apple Grape Grape Kiiwi Banana So the first result I see is Orange There will be a list with the second result in it will be a list with kiwi and bananas. Any ideas how to do this with Linq I really like today It was doing as Suqru has said that this code should do for you: list & lt; String & gt; First result list = sourcelist.first (destList); & Lt; String & gt; SecondResultList = destList.Except (source list); The first result will be Orange in it and the second result will be Kiwi and Banana in the list.

how to convert an integer value to a specific ascii character in c++ -

I'm new to C ++ and I'm trying to do something that should be very basic. I have a small loop in C ++ which just shows the sequence of numbers and I want to convert these numbers into specific ASCII characters. Something like this: for (int k = 0; k And the results should look like this: ABCDEFG ... etc Any ideas? Thank you! Edit on the basis of explanation: Seeing error message from display Style string can be made like this one: for (int k = 0; k

Add whitespace before and after a string in ruby? -

I want to add a white space before and after the random string. I "Random_string" center (1, "") but this does not work. Thank you My Ruby is wild, but nothing is wrong with IMO Do not have DRF pad (random) "+ + random +" "end padded_random_string = pad (" random_string ") "random_string" .center ("random_string" .length + 2)

jquery autocomplete using json -

I have tried many things, but I could not understand this confusing illusion. I have it & lt; Input id = "wba" type = "search" name = "q" value = "" class = "search box" /> & Lt; Input type = "submit" value = "go" class = "search button" /> Also a php file header ('cache-control: no-cache, required-recycling'); Header ('content-type: application / jason'); $ Arr = array ('test' = & gt; 'hello world'); Echo json_encode ($ arr); For Javascript, I have tried everything from JPYar's website to demo, but no luck ... someone helped me to set up a complete data display Does it? Edit $ (function () {function log (message) {$ (" ) .prependTo ($ ("$ log"); $ ("scrolltop");} $ ("# wba"). Autocomplete ({source: function (request, response) {$. Ajax ({url: "search.php", data type: "jsonp...

css - HTML table with fixed header -

I have created an HTML page that has three sections, headers, footer and a table section, which are the headers and footers The article is kept in the middle. Header and Footer CSS (top: 0px; and below: 0px;) is used to set up and down with a specific height. All three are defined. A scrollable table is fixed between the header and the footer, that is, when we have to zoom in and zoom out the table between the header and the footer. Can anyone help? Then insert the table inside the design and give it width: 100%. Setting the height Rows on a table can actually be long if there is no more content, it is a reason to use div outside the table.

oop - "Journaling" or "transactions" design pattern? -

I am trying to apply the object that has been reported, or there is a continuous transaction. That is, the data in the object (probably a map) is as if the changes are made in the data, those changes are organized separately, if you have sandboxed so that any external object base state (before changes) Or access to the latest data. Then there is another operation which changes the base state. This reminds me to some extent the Linux journaling file system is written to File System Change Magazine, and is committed to permanent storage later. This is probably the concept of "transaction" in the world of relational databases; That is, you have some data, you start a transaction and manipulate data in some way. With no changes in concurrent processes, you will see old figures. Then you can either do a "rollback" transaction, or "commit" your changes. I am trying to implement it especially in Java, but obviously this is a normal object-oriented patte...

deployment - Publish entire solution in visual studio 2008 -

I know that by clicking on the name of the project and clicking Properties, How to publish the application. How do you solve it so that you have only one installer for all of them? Do you have a reference to the project? If you publish your project, depending on any other project, it should be compiled automatically. If you want to create a more complex publishing scenario, then I recommend using MSBuild or NAnt. MSBuild has a short tutorial.

performance - Troubleshooting SQL Server Memory Issues -

Currently an active database continues to use more memory until it reaches 5.8 GB and then continuous connection Timeout starts throwing errors. I think SQL Server is designed to use as much memory as possible, but it should not throw those errors, in particular, something seems to run, due to which the memory increases faster than 2 GB DB There are several indexed and stored procedures, how can I track it, who is responsible? The SQL Server system is designed to grow and eat all the memory. That's why it will do this, allocate memory for the query plan cache and tables and index. It is believed to be releasing memory when the system needs it, but it is my experience that the system will start using more memory using the paging system and it will slow down before the release of SQL Server. If your data is not as large as memory, which is eating it and you do not have too many connections, then it will have to allocate memory to use multiple caches. From SQL Server per...

javascript - css body background image clickable -

I have to keep an advertisement as a background image of my webpage, making the clickable link to body background image best What's the way You can not create a background image Clickableable Is your image taking up whole body space?

mysql - How to make PHP use the right charset? -

I am creating a KSSN (Korean ID number) checker in PHP using a MySQL database. I check that it is working on an external site using the file_gate_content call. The problem is that (with Hangul / Korean characters) the request is using the wrong charset when I echo the string, then the Korean characters are replaced with question marks only. How can I use Korean? Should I change anything in the database? PRP source and SQL dump: Note: I am using Apache (HTML), not CLI. You need to do the following: Browser Tell us what encoding you want to get in the form submission, in the reply of aviv content type title or and lt; Meta & gt; by setting. Tell the database which encoding you are sending it bytes in the database. Currently you are using the EUC-KR in the database, so it is possible that you want to use that encoding in both the above points. In this century, I recommend that UTF-8 is used for all web applications / databases, as is the East Asian multi...

routing - ASP.NET MVC - Help defining route entry -

I want to create a path entry for a URL , which index string foo ) The action method of a controller named User At the same time the default Home Controller should not be affected and should work normally Any help is greatly appreciated Thanks You can try entering it before the default route: Routes.MapRoute ("FooRoute" "{Foo}", new {controller = "home", action = "index", foo = UrlParameter.Optional});

command line - Best practices in scheduling PHP scripts -

I need to schedule several PHP scripts for a project. Some scripts are a bit complex (i.e. send mail, database Make stuff, use many external webwares, use external files and classes etc). The problem is that these scripts need to be called from the browser, and they use some variables in the $ _ server / array (including HTTP_HOST ). Is there any way of doing this kind of scripts from the command line, or do I have to re-write them to make them commandline-compatible? Or is it better to use parameters than command line, which specify the variables that are not available? We have a server running Windows Server 2008. You should dump the part of the script that is normal in browser and command line environments. After that you can add it to two scripts, one of which will use $ _SERVER, one more command line argument variable to run the common part.

php - check if the file exists, if not, create -

How do I use php dom, if an XML file exists, and it is not created. AppendChild ($ newText); $ Xmldoc- & gt; Save ('sample.xml'); ? & Gt; Right now, because it does not exist, it gives me this error: DOMDocument :: load (): I / O Warning: Failed External To load the unit Do not do this with the DOM, check it yourself: If (file_exists ('sample.xml')) {$ xmldoc- & gt; Load ('sample.xml'); } And ($ xmldoc-> loadXML ('& lt; root / & gt;'); // or any other Routot name that attacks your fancy} file For savings will automatically be $ xmldoc-> Save (); with the next.

Facebook get user id on page tab (signed_request) -

I have participated in a problem. I have a custom page tab, and when I look at the current user I ask the user to give detailed permission to my profile (using Facebook.showPermissionDialog). If he allows, in theory, I will have access to graph API and other things. But when I parse the new signed-related paragraph from Facebook, I get an othe_token, the current page is bound to the tab, not on the user profile. In other words, the Graph API method gives me my custom page profile for 'm' and I want to get a user's profile! How should I use it? How to access the user's graph on Facebook tab? I have come to know how it works. After the permission of the user grant, Facebook sends the signed user's message (and also its ID), when Ajax calls the page on its server when the page is loaded steady - you can sign-in sign- Receive requests from the Pages tab, hope it will help anyone.

.net - VS 2010 Error Generating Unit Tests -

I have a .NET 4 DLL for which I am having trouble generating a unit test. I am using the VS 2010 standard. In the solution every other project will produce unit test stub for classes. For other assemblies, I can go to the existing code, by right clicking the name of the class and selecting "Create Unit Test". I find the window that runs properly. An assembly which I need some coverage, will not produce a test stub using the same method described above. I go to a class in the project / assembly, right click, select "Generate Unit Test", and I got the following error: Unit Test Generation Error: Following Error Was encountered while reading the module 'xx.Core': The type reference could not be solved: [System.Web, Version = 2.0.0.0, Culture = Neutral, PublicKiton = xxxxxxxxxxxx] System.Web.Routing.RouteValueDictionary As far as I can tell, in error message Described there is no direct reference in the project framework version 2.0 System.Web. Looki...

mysql - What are the known ways to store a tree structure in a relational DB? -

There, that means each record points to their parents. Maintain that hard to read but easy to maintain. And then there is a "directory structure key" method: 0001.0000.0000.0000 main branch 1 0001.0001.0000.0000 one of the main branch etc etc Super easy to read, but difficult to maintain. What are the other ways and their cons / professional? As always: There is no best solution. Each solution makes different things easy or difficult. The right solution for this depends on which action you will take. Relative approach with Parent-ID: Professionals: Easy to implement Easy to move any other parent to a large sub-location Insert is cheap Accessible area directly in SQL Cons: Retrieving the entire tree is recurring And so expensive All parents are too expensive to find (SQA Revised ...) Modified Prior Tree Treversal (A Start and End Point Saving): Professionals: Retrieving the entire tree is easy and cheap It is ...

Secure elmah with ASp.NET security but only to some users -

Hello, I am developing an ASP.NET application and I want to add Elmah. The problem I have is that users enter the site and I have found the only way to protect Elmah, to authenticate users, not specific users. I am using ASP.NET MVC2 and Net4. Any thoughts? You want to restrict elmah.axd (assuming you are using the handler) Not all certified users only for a specific user role. & lt ;! - The unauthorized users will have LMAX- & gt; Decline to see. & Lt; Location Path = "admin / elmah.axd" & gt; & Lt; System.web & gt; & Lt; Authority & gt; & Lt; Allow roles = "admin" /> & Lt; Deny users = "*" /> & Lt; / Authorization & gt; & Lt; /system.web> & Lt; / Location & gt; Phil Hack is good on the subject.

php - Use wordpress database for other script -

My website was used to work on the WordPress engine but now I am writing my script. The problem is that the user password is encoded in a weird way in the wp_users table ... Can anyone please tell me how should I encode it so that it can work on my new script? "Encoded" password is called a hash. Look through the WordPress code where it inserts the user and finds out how the password has been found. Use the same type of plan This will probably use salt, how do I know how WordPress works, but you'll need the cost of that salt and also the exact match. Edit: By doing some research, you would want to take a look at around 1200 wp-included / pluggable.php file in the line. There should be salt and password generator techniques stored there (or at least I think, I did not open it very deep).

duplicates - How to apply patches on the top of a git tree preventing duplication? -

I am seeking advice for a problem that I thought that simple, and it really is a small script But I think that should already be done in a way to do this with Git / Quilt / Stgit. I'm not really doing good on Git and this is a problem for me. My problem: I've got a guit tree (Linux kernel) and several patches. What happens, such a patch was intended for the older version of the kernel, and many of them have already been applied to my tree. A header row or patch starting with b1af4315d823a2b6659c5b14bc17f7bc61878ef4 (timestamp) and pre> Git b1af4315d823a2b6659c5b14bc17f7bc61878ef4 show in my kernel tree, I can see this to my current tree is already available, and I've never tried to implement them. I tried to use things like git apply or git am , but they try to apply the patch: alan @ubuntu: ~ /Desktop/openwrt/linux-git/linux-2.6.33.y$ Git apply -P1 --check --index / home / Allen / desktop / OpenWRT / SVN / vomiting-branch / build_dir / Linux K...