Posts

Showing posts from April, 2012

asp.net - exporting rdlc report into pdf on button click -

Hi Anyone can help me with this. I have the RDLC report displayed on my web page using Asp.net and C # .net I want to export it to PDF on button click. Can you help me? Thank you I did something like that sometime ago. Below is the code I used in the page_load event of a page, it is in VB and it is not the best code in the world, but you can get help to get the solution. Completed = request as action ("job") dim RV Reporting.WebForms.ReportViewer Dim R string = "apps / report / legal_document.rdlc" dim ds new jobmanagerTableAdapters.JobInformationTableAdapter dim DS2 New ordermanagementTableAdapters.RecoveryItemsInformationTableAdapter dim DS3 New expensemanagerTableAdapters.tbl_expensesTableAdapter dim DS4 New ordermanagementTableAdapters.tbl_orders_collection_itemsTableAdapter dims as DS5 As in as new attachmentsmanagerTableAdapters.tbl_attachmentsTableAdapter dim ds6 New notesmanagerTableAdapters.tbl_notesTableAdapter dim ds7 New payments_manage...

deployment - Living on the edge: can I change a constant string in a deployed asp.net website page dll? -

(Unfortunately, this question is about a non-recommended practice. I know that There is no good practice, but every now and then we just have to open our tricks; -)) In such a situation where we have accidentally published an asp. Pure website, with a wrong URL, pure website, we just want to open that DLL and want to change the URL to prevent waiting for another publication for another week. In the old native DLL I knew how to change resources, but how would I try with this .net DLLs? What else is the easy method, or is only a hacker (I know of ildasm and ilasm )? If it means that string is a literal inside event handler. Here are some ways to consider: Reflective , Is able to edit the IL of a compiled assembly. If you are using code signing, then maybe you have to be tweaking the headache in a signed assembly. Robocopy is a useful tool for publishing web sites, only minor changes can be made. Robocopy is only capable of copying files that have been modified....

git - How to track who pushed into a Gitosis repository? -

I am using guitosis to manage a set of repositories. The problem I have is that the GTOSIS does not maintain a record whose user pushed a special commitment, only one information I have "author" and "committee" fields that commit themselves, and to "push" Anything from can be set. Now I know that a single "push" can send many people to the Gitosys server, and each of them will have been created by different developers, so let me tell you It should be stopped that I am only interested in the head in the branch that has been pushed. This commitment has been made (should be made!) By the person making the release, so I want to know who he is, if I can do the problems then I can kill him. I have this idea, use a hook on the server to compare the head commute committi for the Gitosos username, if they are both "john.doe@example.com" then there is a pushing compass and Push is allowed, otherwise it has been rejected. Is this possible?...

php - How to activate "go to definition" in Eclipse for inherited class property -

I have a base class (lets say this a) and I got class (these are called AA). I have a different abstract class: abstract class different class {/ ** * @ var A * / protected MyA; } In another separate category: class provides a more different class {public function __construct () {$ this- & gt; MyA = new AA; }} My problem occurs when I will take me to the original class A file in the MyA Inheriting class on ctrl + left click. I should take me to aa file. What is the PHPdoc method of doing this? I think this is just because "phpdoc" is your work indicating that protected MyA is of type property "A" PPDK Definitions No " Anything is being taken from the code = new AA" code line > I think that you could potentially override this behavior locally in relation to "more protected mea" in its more diverse category, and there is a docblog Show "@ AR AA" which can put I do not really have any other options...

sql - How do you rewrite a query in PostgreSQL 8.3 -

I am quite new to SQL and need some help with a certain task. I have a query that is called by our flex / java code which is included in many tables to get the information. After running on the analysis of an explanation, I have seen that the query takes more than 15 minutes, which is sometimes many times if the site is in heavy traffic. What I'm trying to do is to create a rule or trigger, which sees that the query is called and instead selects the data from the physical view table. I tried to apply a rule for this, but when I was having trouble getting errors while trying to join many tables in the rules, there is a way in it, whether it is a rule, a trigger, Or I have not seen anything, to see if a certain query is executed that I can replace that query from another table? Thanks in advance. Example of the query: player_id, player_level, select current_location (player_id) from server_info to player_id (location_id) where current_location = 'central Hub ' W...

tablelayout - Android TableRow - How to add View dynamically to certain postion? -

I'm dynamically creating TableLayout and I need the tableau, there is a difference in some column position. For example, I have an image of line 3 and 5 on position, ImageView 1, 2, 4 position is in the next line. I try to use: table row line 1 = new lockover (this); Row1.addView (new ImageView (this), 2); Row1.addView (new ImageView (this), 4); MTable.addView (ROW1); Table row line 2 = new talc (this); Row2.addView (new ImageView (this), 0); Row2.addView (New ImageView (this), 1); Row2.addView (New ImageView (this), 3); MTable.addView (line2); But I found the index upfold exception at runtime. Error / Android Randomime (771): generated by: java.lang.IndexOutOfBoundsException: index = 2 count = 0 Any suggestions would be appreciated. Thanks. Actually, the error seems logical enough for the first time to look at your code until you get the table XML Not created and as the number of required rows, when you add a view to index 2, then this index does not exist. Try...

vb.net - Nested using statements -

As Eric Gunnersson shows in the blog post, in C # you can use Nest As statements: (StreamWriter w1 = File.CreateText ("W1")) (StreamWriter w2 = File.CreateText ("W2")) {// code here} Is there a similar way to do this in VBnet? I want to avoid many indentation levels. like this: as new cheating Using, using new alignment () ... as the _b

Animation in WPF query -

I'm playing with WPF for the first time in animation / graphics context, and I'm thinking how you will take around The side sprites I went googled and came up with examples, but the animation is done by marginalizing and padding increased / decreased. My question is, is this normal? I would have thought that you can not change the animation by changing the coordination of a phantom to X and Y, not its padding. Position and margin are the same thing as the distance or window edge of the status screen. Margins are the same thing.

visual studio - Is there any way to create a blank solution (.sln) file first and then add projects? -

Visual Studio has always annoyed me because (for my knowledge) you can not create a solution first and then add new / existing projects. this. In a way I know how to create a solution to create a solution and to specify a solution name for it. So, there is no way to start with Visual Studio (.sln) with a blank solution. Yes, gives an overview. From the article: To create a new solution, File menu On, click New > and then click on Project . In the Project type pane, select Other Project Types > and then select Visual Studio Solution In the Templates panel, select Empty Solution for a project enter name. To change the location of the Solution directory, Browse and specify a new location. Select OK After creating an empty solution, you can add new or existing projects and items to an empty solution, add new items or add existing item commands from the project menu. .

EXTJS: Change the color of a node -

I should be able to change the color of a node in a panel panel. I thought it would be very easy, but I have a herd to find some time. Thank you Of course, after 5 minutes of asking, I got the solution It works without extracting the current square, but I just left that line because I am donkey. I do not know if later problems can arise, So it is not. & lt; Style & gt; .RedText is a duration {color: red; } & Lt; / Style & gt; Var currentClass = opNode.attributes.cls; OpNode.ui.removeClass (currentClass); OpNode.ui.addClass ('redText'); OpNode.attributes.cls = 'RedText';

iphone - Xcode 4 - Connecting Outlets -

Image
This page shows how easily I can connect the outlet to encode 4, but I can not get it. I will click properly and pull out an outlet from the newly referenced outlet circle, and in my header the object is declared but nothing happens. Has anyone used it? Thank you very much I had the same problem with the last version of Xcode 4 Before dragging and using the amp, it resolved by selecting the file owner custom class ; The drop outlet feature shown on the screenshot below.

backup - Backing up and restoring a sharepoint content database across two machines, hosed my sharepoint app -

I have two machines compatible with A and B sitemap. I want to take the content database from Machine A and restore it on the machine B on the site. I used SQL backup to backup machine A's database, and it was restored in Machine B, overwriting existing content database. However, my SharePoint site became obsolete - I found a general site error was not found. Did I also have to back up and restore the SharePoint_Config database? What is the best method for such situations? You need to tell SharePoint where your new database. Just visit the Content Database Management page on Central Administration. There you will see your previous database mapped in the web application. Delete this and the new database. This will map it to the web app and your site will return. Be careful when entering the server and the database name, because instead of connecting to the existing one, you can create a new DB if you type the name incorrectly

C++ Singleton Threading problem -

I have C + Singleton that runs as a separate thread. This singleton comes from the base class provided by a library and overrides the lawn (...) method. The onologian method is synchronous, if we accept the logon attempt, then it wants to know immediately. The problem is that we need to pass the logon information via a security server message. We can register the callback with the security server listener (a separate thread) to obtain the results of the logon authentication message Are there. My question is how do I block in the login mode as if I can wake the thread by callback, I have registered with the security server listener thread, and how can I use the feedback received from the security server in a thread I should safely (ie, I should be able to handle multiple concurrent logon requests). I'm completely stumped. Use empty semiconductor after you send the credentials to the security server, take a sequa as it is empty Because it will stop execution. After that,...

iphone - How to search and correct html tags and attributes? -

In my application, I have the litter to fix all the closing tags of and; Img & gt; tag as shown below & lt; Img & gt; & gt; Instead of closing it with , it should be closed with /> . All & lt; Img & gt; to search for and & gt; (If this is not an action already required by an /> ). Any other questions, if & lt; Img & gt; There is no width or height for Specified, what is the best way to solve this problem? Download all images and get related features of width and height, then add them back to the string? Correct & lt; Img & gt; The tag is the one that closes with /> and and has a valid width; . Height & lt; A href = "http://www.cultofmac.com/daily-deals749-mac-mini-1199-3-0ghz-imac-new-mac-pros/ 52,674" & gt; & Lt; Img align = "left" hspace = "5" width = "150" src = "http://s3.dlnws.com/images/products/images/749000/749208-large" alt = ...

visual studio 2008 - ATL project created using wizard does not compile due to unresolved symbols -

I'm working to get basic ATL projects to be compiled in Visual Studio 2008 and I'm running in errors I am Eventually I was stuck with the following build errors: 1> Linking ... 1 & gt; Library debug \ SomeProject.lib and object debug \ SomeProject.exp 1 & gt; Dllmain.obj: Error LNK2001: Unsolved External Symbol _LIBID_SomeProjectLib 1 & gt; SomeObject.obj: Error LNK2001: Unsolved External Symbol _LIBID_SomeProjectLib 1 & gt; SomeObject.obj: Error LNK2001: Unsolved External Symbol _IID_ISomeObject 1 & gt; Debug \ SomeProject.dll: Fatal error LNK1120: 2 unsolved embedded What am I seeing or doing wrong? These steps are given to reproduce. Create a new ATL project named SomeProject . Accept all the mistakes. Right-click the project in the Solution Explorer and click Add & gt; Class . Enter ATL Simple Object and enter SomeObject as its code Accept all other defaults. The project fixes at this point. However, I want to split my ...

Python Web Server - Getting it to do other tasks -

Using the following example I am running a basic web server, but my problem is that handle_request () blocks do_something_else ( ) Until no request comes. Does the web server need to do any other work back around it? Def run_while_true (server_class = BaseHTTserver.HTTPServer, handler_class = BaseHTTPServer.BaseHTTPRequestHandler): server_address = ('', 8000) httpd = server_class (server_address, handler_class) while keep_running (): httpd.handle_request () Do_something_else () You can use multiple thread executions through Python Are there. The example is given below: import threading # ... your code is here ... def run_while_true (server_class = BaseHTTPServer.HTTPServer, handler class = base.httpreserve.baseHTTPRequestHandler): server_address = (' ', 8000) Httpd = server_class (server_address, handler_class) while keep_running (): httpd.handle_request () if __name__ ==' __main__ ': background_thread = threading.Thread (target = do_something_else)...

database - Is it bad to use redundant relationships? -

Suppose my database has the following tables: Now all my The queries depend on the company table Edit 1: Background is a problem with the problem that is a problem with an intersection. See. Editing 2: No company can change its company. Editing 3: I do not write mysql questions. I use an abstract layer (Django). This is bad behavior because updating your unnecessary data is independently and therefore unnecessarily. A process that is full of potential for error (even assigned to automatic cascading and to be maintained separately) By starting this relationship, you effectively deprecate your database can do. Demilization is sometimes necessary for execution, but by your question it seems that you are simplifying your SQL. Use other mechanisms to summarize the complexity of your database: View, stored process, UDF

php - user can log back in in IE after logging out by hitting back button -

I am using a PHP login script which challenges the user for username & amp; password. Once the certified program stores a session value. At logout, the session value is set to an empty space. Here's the problem: In IE 8 (not Firefox), the user can press the back button on the screen "The web page has expired "Many times until the message is displayed This is the possibility of the login screen. If he presses F5, it seems that the username and password are still in the post variables and it is logged in again. It seems that you are not actually removing the session on the server, but rather the URL on the client (Or something) in session IDs are cleaned up So when the backbutton is pressed, it tries to re-deposit so that it can be passed with the session and your server is accepting it. OR Pages are being cached by the customer and when they press back, it loads from the cache. When they force to refresh, they reload the page without variables. ...

mysql - "caching" an array of database values in php (2 options, which is better?) -

(I use the word var in the following because I'm not sure what I think is the global variable ) I want to cache the values ​​from a table in the database to save the repetitive questions. What I have done is making a singleton class, in which there is a function to check a var inside the class, if there is a key, if this happens then just return values ​​from var, if the database queries Does not load it and it does not load in Var and it will return it. Or would it be a better way to use a global variable (does global variables have no importance, no files from this?) And a class at all. Do not disturb or cache and ask the database every time the value is required. Should I post with its source? / P> It depends on your queries - how expensive and heavy is for the database? If this is a very simple and light question - I would say that caching is not needed (unless you actually have a high volume - thousands or lacs in a short time) for your simple recapitalizati...

c# - Printing complex Winforms -

We have found a complicated Winform app with each form that contains potentially multiple sub-forms and capable of printing Need to have data contained in these forms We are currently using Print Document Control. For each form (or form element) that we want to print, we are calling the Control.DrawToBitmap () method, then dragging the Graphics object while printing Are there. It mostly works, and we have alternative solutions to print the entire contents of the form with scalable content. However, we have 2 problems. 1) The quality of print out is very low, and in many cases is difficult to read; And 2) Print out looks quite different depending on the user's screen resolution Is there a good way to print C # form? Surely this is a problem that has been solved earlier. I like a method that I do not necessarily need to re-apply front end (with crystal reports) You may want to increase the size of the bitmap / rex you are attracting if the bitmap resolution i...

iphone - Assigned value is garbage or undefined logic error in XCode -

I am updating our iPhone app for iOS 4 and I have been involved in a problem "near the function call -By-debit is undefined "in the code for (i = 0; i Which is fair enough, the width [ii] has not been started. By updating the code (below), I get this new error, "Assigned value is trash or undefined". Reading on this I think segWidth preserves its value as garbage - is it correct and if so, how can I clean it? i ; I ------------- Edit ------------------ Thanks for the guys Thanks more info as follows; A generalized version of the method is shown below as some function. I have removed ugly artists but still looking at logic error for the "Assigned value trash or undefined" line segWidth = width [i]; I believe that this value is seen, there is no clear initiality in the width [i], I am unsure if I lack the understanding of the original obz-c float, or if my assignment There is no logic defect in the syntax? - (zero) Some functions {u...

javascript - Relative time function in js for format YYYY-MM-DDTHH:MM:SS+0000 -

I was wondering if anyone knew how I can parse this type of date format: 2010-07 -26 T18: 02: 46+ 0000 relative time such as "30 seconds ago" I have a function that does the same and different time format: function relative_time (time_value, is_relative) {var value = time_value (""), perced_data = date.pars (value [1] + "+ value [2] +", "+ value [5] ] + "" + Value [3] + "UTC"), date = new date (parsed_d T), relative_to = new date (), r = '', delta = parseint ((relative_to.getTime () - date.getTime ()) / 1000); Var seconds = {'to': {'min': function (V) {return v * 60;}, 'hours': function (v) {return.minutes (v) * 60;}, 'day': function (v) {return.hours (v) * 24; }, 'Years': function (v) {return.days (v) * 7;}, 'months': function (v) {return.weeks (v) * 4.34812141;}, 'year': function (v) {Return}}, 'To': {'min': function (v) {return v / 60;}, ...

linux - How to tell which unix shell I am using? -

इस सवाल का पहले से ही एक उत्तर है: 20 उत्तरों क्या कोई आसान तरीका है जो मैं बता सकता हूं कि मैं किस प्रकार के यूनिक्स शेल हूं यानी मैं एक bash / csh / ksh / tcsh ? कोशिश करें: प्रतिध्वनि $ 0 यह अक्सर कई प्रकार के गोले में काम करता है।

multithreading - Looking for an optimum multithread message queue -

I will run multiple threads within a process. I'm looking for the most efficient way to be able to send messages between threads. Each thread will buffer a shared memory input message and the other thread will write the appropriate buffer. Message will be priority I want to manage myself this process. Without expensive locking or synchronizing, what is the best way to do this? Or is there a well proven library already available? (Delphi, C, or C # is fine). It's hard to get right without repeating a lot, others have already done it for you Mistake :) Take a look - there are many well-designed queue templates (and other collections) in the library that you can check and see which is best suited for your purpose is.

xcode - UIAudioPickerController for iPhone App? -

Not sure to call, but I provide a way for users to choose and control their music Want to do My app has seen some apps that offer the "iPod" button that appears to bring the iPod app. Is it made in control like UIImagePickerController or do they just duplicate all the functionality? Specifically, you can about the Media Player Framework Are talking in

Any way to override .blur() if .submit() is called upon in jQuery? -

I am writing a custom code for CMS for the website. When a user clicks on the submit button (built with the jQuery UI), it calls the click event on the button, in return for which there is a submission event, which submits the form. said that the form also shows specific fields to see if they have the text, and the error message and disable the button until suspending submitted issues. To do this, I currently use Focus (), which has a .blur () function inside it, which checks to see if the error has been fixed and if the notice was removed (if it is) And if there are no other errors, the button is reactivated). Now, I have this issue that if a user checks any area at any time, if they do not press it out and try to submit form data, then The Blur () function takes control (as it is coded), so the form takes another click to submit the data. Is there any way to do this. Take precedence over submit (). Blur () In JQuery this problem can not occur (for now I just tell the user t...

c++ - Circularly declaring Preprocessor directives? Or defines before includes? -

I'm a bit new in C ++, so stay with me I'm trying to figure out that my project Where to place my #defines and #includes in I have something like this: main.h #include "other.h" #define MAX_GROUPS 100 Straight Cat {int somewhat [MAX_GROUPS]; } I need to use MAX_GROUPS , so if I also MAX_GROUPS I also define other.h like this: Other .h #define MAX_GROUPS 100 Street other {IT Taco [MAX_GROUPS]; } The problem is that I am constantly defining more than one location. I want to keep it all together. Alternatively, can I reinclude main.h ? other.h #include "main.h" straighten the other {Inte Taco [MAX_GROUPS]; } The problem here is that I think this is made like a circular dependency also includes main.h in other.h Which includes main.h which contains other.h , which contains etc. What is the best way to set up and it is included in a project so that things can be cascade in other included files? Is it co...

linux - Any way to run shell commands on android programmatically? -

Is there a way to run a terminal command on my application and access data on my UI? Specifically top . See log collector as an example. Here it is. The key is here: ArrayList & lt; String & gt; Commandline = new Array's & lt; String & gt; (); CommandLine.add ("logcat"); // $ non-NLS-1 $ [...] process process = runtime.gettime (). Exec (commandLine); Buffered buffferedReader = new BufferedReader (new InputStreamReader (process.getInputStream ()));

What is most efficient way to do immutable byte arrays in Scala? -

I have to get an array of bytes (array [byte]) from somewhere (read from file, socket, etc.) And then provide an effective way of pulling bits out of it (like providing the function to extract the 32-bit integer from the array in Oreset N) I then want to wrap the byte array (hide it) so that the bits from the array Can be done to pull out (possibly taking each bit Using lazy val gram). I have to imagine having a wrapping class, to prove the array content, an irreversible byte array type in the constructor is never modified. Indexed Sick [byte] seemed relevant, but I could not work to go from Array [Bite] to Indexesac [Byte]. Part 2 of the question, if I use indexed sick [byte] then the result code may be slow? I need a code to run as soon as possible, so stay with Array [Bite] if the compiler can work better with it. I can write an envelope around the array, but this slow down point is an indication of an additional level of access to the bytes in the array. Performance is im...

.net - Using the C# Volatile keyword in Threaded Application -

I have a class in which there are some arraylists. My main class creates a new example: at least 2 threads in my main square of this class are included and removed from my class with a simple list. At the moment, everything is going well, but I was wondering if it was my class with variants of simplicity like / or will be safe to declare as a private volatile miclass; Myclass = new myclass (); ...... myclass.Add (...) myclass.Clear (..) Use of Volatile Keywords In this example your code will not be thread-safe. The volatile keyword is usually used to make sure that when the value of a variable (i.e. class field) is read or written, the latest value for that variable is either read from the main memory or directly from the cache Is read (for example, a CPU register) for example, unstable keyword is a way of saying "do not use caching optimization with this shared field ", And removes the issue where threads can use local copies of a field and therefore can not s...

javascript - Match part of img src when comes into dom and add a class to a <p> tag that matches - jquery -

I have found an AJAX loaded image gallery that loads an image to the dome and then removes it and loads in the next one Does and swirls in that way Inside the image, I get a list of static names for images (they are on page load and do nothing). What do I want to do, as the image has been loaded into the DOM, I want to match it with the name of the name of the name of the name / category of the source / source of Reliance SRL. The desired result is that as soon as the image is displayed, its name is underlined and then when it goes, its name is no longer underlined because the next picture names are now underlined ... I am doing if someone can show me how to do this, then I will be really grateful to bloody! Thank you! You can use jQuery's .load () method ( For more precise, load events images such as $ ('# imageid') .load (function) {// image var myrr = $ (this ) .attr ('src') was loaded; if (mySrc.indexOf ('some_string_identifier'...

How to save an XML file on the web server using PHP? -

I am making a beginning in PHP and I do not know anything about XML manipulation. I am working on the Google CSE Annotation XML shown below: & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; - & lt; Annotation & gt; - & lt; Comment about = "http://sanspace.in/" & gt; & Lt; Label name = "_ cse_byxamvbyjpc" /> & Lt; / Annotation & gt; - & lt; About annotation = "http://blog.sanspace.in/" & gt; & Lt; Label name = "_ cse_byxamvbyjpc" /> & Lt; / Annotation & gt; - & lt; Comment about "http://google.com/" & gt; & Lt; Label name = "_ cse_exclude_byxamvbyjpc" /> & Lt; / Annotation & gt; & Lt; / Annotation & gt; I want to receive this with the file shown above: & Lt; / Annotation & gt; - & lt; About annotation = "http://blog.sanspace.in/" & gt; & Lt; Label name = "teststri...

html - Reload the page with parameter triggered by JavaScript dropdown change event -

I want to reload a form and select it with the selection. I have an HTML form here: & lt; Form name = 'vehicleform' & gt; & Lt; Select Name = 'Vehicle List' & gt; & Lt; Option value = '' & gt; Select & lt; / Options & gt; & Lt; Option value = 'just' & gt; Just & lt; / Options & gt; & Lt; Option value = 'bike' & gt; Bike & lt; / Options & gt; & Lt; Option value = 'car' & gt; Car & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input type = 'text' name = 'on' & gt; & Lt; / Input & gt; & Lt; / Form & gt; When the user first opens the page, the dropdown box is at the option Select and the text box (current) will be empty When the user selects any option from the dropdown, then the page needs to be reloaded and that dropdown item should be selected and the value of that dropdown should be in the text inp...

image manipulation - Imagemagick perspective and virtual pixels -

I am trying to straighten an image so that the image is aligned with the grid. However, whenever I manipulate, there is a white border around the image. Can anyone help me with this problem? I managed to solve it, found out that I had some value incorrectly, Virtual pixels were forced.

Play with Div using jQuery or Javascript -

I want to take the specific device up to the link. Similar to moving the Div down on the down link, as shown in the screenshot, I want to insert the Div at the 'IB' link before the specific divis. I want to design the 'IA' link after a specific div To remove a specific device on the 'D' link. But someone The feedback will also be highly appreciated ... Edit: Screenshots link is now! jQuery definitely makes this type of thing a bunch easier. Looking at this simple markup: & lt; Div class = "moveable" id = "div1" & gt; A & lt; A href = '#' square = "top" & gt; Go up & lt; / A & gt; & Lt; A href = '#' square = "bottom" & gt; Move down & lt; / A & gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; Div class = "playable" id = "div2" & gt; Two & lt; A href = '#' square = "top" & g...

Forcing Interface Builder to change class of objects(UIButton->UIControl) -

I have a UIView that is full of buttons which are well-accustomed to all actions and outlets. However, in my eternal knowledge, I have decided that I would actually separate the button behavior and UIControl subclassed it. My plan was to hop in the builder builder, the new UIControl subclass changing the button of my class, and then up and running it will preserve all outlets and action connections. When I write in the area of ​​class in my UIContol sub-class, look at the IB (see Identity Inspector), when I press out, then it takes the UIButton back to a UIButton subclass Works but I do not have a UIControl, I can go down the legacy tree, but no. The first scheme was to go to XCode and change the UIButton temporarily to its new control, to change the 'class' of my IB buttons, and then change the XCode code back to Supercompatible UIControl. IB accepted and changed the class, but running the app, I see a non-visible button. IB features inspector still shows it as a but...

How to go to previous activity if the activity is killed by Android runtime? -

I had a problem with an app, that is, when I'm going to the previous window, the control goes to the splash screen My app because last activity is killed by the Android Runtime How do I keep the past activity alive, or how can I make the activity again and how to use it with current activity. You can use a default constructor to close and open the screen. If you want to move between screens: 1-2-3-4 & amp; 4-3-2-1 Android will take care of it itself. For example, if you want to cross 4-2-3 in a specific way-1 if Android does not allow you, then just create a constructor and assign current activity to it and use that variable to close the screen at any time To do it. For example, here is the activity class the public class increases an activity {private one screen; Public one () {screen = this; }} Just use this when you want to stop this activity: Screen.finish (); instead of this.finish (); When you want to invoke a new activity of your choi...

linux - HTML to XHTML Mobile Profile Converter -

I'm looking for a Linux library / service that can convert the supplied HTML to the XHTML-MP format . It should be true if this library should also be known to resize the embedded images. Take a look at this to clear your HTML that it is well-formed.

sql - Convert result within statement -

Assume that I have the following simple query select the top 1 name for months which gives name = "march" is it possible to change this result? Instead of "march" let me name = "3" what SQL is able to do such things? I am using an MSSQL database. [Update] Corrected the query. When writing this simple example, I mixed it with MySQL [/ Update] You want to map a certain set of input values ​​against a certain set of output values, when is the case your friend: select name name then 'Jan' was then 1 when 'February' then 2 when 'march' then 3 / * ... * / END months as number of

Should we store Japanese/French and other non-ASCII characters in java source code? -

I am using some Japanese / French words in some regular expressions inside my source code. I do not want to convert them into track by \ u notation because it would be difficult and it would be difficult to catch the bug. Do we have a standard practice in dealing with non-ASCII characters in the source code or is it OK to use them. Thanks This is risky as the program behaves now on the machine platform Depending on the default encoding on which the program is compiled or compiler logic And it also makes it difficult to catch the bug. If there are some such reges, then I like to use Unicode migration. If there is a lot, I use UTF-8 for bullet cutting and source code, but only after I have it a build script (and the app can be used with that script Some unit tests which confirm that regexes are working correctly An automated build server Which runs unit tests for each build

imagemagick - Clone PDF file in a single page -

I've found a PDF file which is actually 1/5 of the size of an A4 page, and one to convert it The problem with adding it to an A4 page repeatedly is that ImageMagick only works with bitmap graphics, and my PDF contains text and detailed vector graphics. The result is the loss of text data, huge file size, and worse print output. I line Convert density $ 1200 pdf_file would like to be able to do the same as the $ Pdf_file $ pdf_file $ pdf_file $ pdf_file + Add $ a4_file vector graphics Without any rastering . OK, I have an idea how it can work, but I test this time There is no possibility to do. Now consider these three commands (need Unix classified If you are not on Windows): gswin32c ^ -sDEVICE = pdfwrite ^ -o p1. pdf ^ -dFIXEDMEDIA ^ -sDEFAULTPAPERSIZE = A 4 ​​^ -r600x600 ^ -dDEVICEWIDTHPOINTS = 842 ^ -dDEVICEHEIGHTPOINTS = 595 ^ -c "& lt; & lt; / PageOffset [0 0] & gt; & gt; setpagedevice" ^ -fc : / path / / first .pdf gswin32c ^ -sDE...

visual studio 2008 - How do I properly style a button in WPF? -

I know that this is a basic question, but I am having trouble understanding how to do it properly. Looking at the following XAML: & lt; Button & gt; & Lt; Grid grid. Raw = "1" & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Column width = "16" /> & Lt; Column width = "*" /> & Lt; /Grid.ColumnDefinitions> & Lt; Image grid. Column = "0" width = "16" height = "16" source = "resource / accept" /> & lt; TextBlock Grid.Column = "1" margin = "2" & gt; Continue & lt; / TextBlock & gt; & Lt; / Grid & gt; & Lt; / Button & gt; How do I change it to a style so that it can be easily reused? What if I want to supply an image source and text in a feature? Is this possible? On the related note, what are the best practices for structuring files, where do you store your own styles and more? Do you just leave them in a new...

phonecalls - Can I reject a call from the iPhone SDK -

I want the call to be automatically rejected when it comes to my app. Is it possible with the iPhone SDK? No, it is not third party applications do not interfere in the main functions of the phone.

c# - Windows tool to write socket output to file -

Is anyone aware of a Windows device that will write output to a file from a network socket? Open source (preferably C #) will be preferred, but not necessarily. I know that it might be very easy to write, but I guess that in an existing tool, probably What you should do on Windows should be (Not C #, believe.)

java - Generating Hyperlink / HTML / 'Please suggest' in a loop in GWT? -

Then my question is as follows: Say, after receiving the data in a flicktables I am from a database, it is using the loops in a regular way. Now, in the entire first column, the text should be clickable, that is, I should add the call handler to the first column values ​​(as I would have to load another table after clicking on the first column text vals .) Question : How can I generate a hyperlink tag in a loop? The problem comes when I try to do this because I do not know how the loop runs and when using click handler, the same concept is used. Should I use something other than hyperlinks for this task? How do you explain? I really appreciate the help because I am a very new GW Coder. - Viva Using hyperlinks is not the best way to do something like this. Because you should not use the clickhandler with hyperlinks, a hyperlink has set up an HistoryToken and you should answer the change of history. I will use a label and if you want to feel the same passion and fe...

cocoa - Problem registering file type through UTIs -

I'm using to create a license in my app, and as the developer guide tells me that I registered the custom file Trying to expand, such as users can simply click on the license and my application will open it and then verify the license. To do this, I have added the export UTI announcement to my Info.plist as follows: However, when I double-click the file with that extension, it does not open in MyApp, nor from the recommended apps for MyApp to open the file type. Appears as one. Also, while viewing the information panel for the file, the details of the specified file type are not visible. Thanks = "post-text" itemprop = "text" > You need the CFBundleDocumentTypes announcement. & lt; Key & gt; CFBundleDocumentTypes & lt; / Key & gt; & Lt; Array & gt; & Lt; Dict & gt; & Lt; Key & gt; CFBundleTypeIconFile & lt; / Key & gt; & Lt; String & gt; MyAppLicenseIcon & lt; / String ...

objective c - xcode project-/target-settings-syntax for linker flag force_load on iPhone -

I'm faced with double tie, that for one of the 3-party static libraries on one side, my iphone application Uses, the Linker Flag -all_load should be set in the application project- or target setting, otherwise the app crashes at runtime, is not searching for some other mark, which is internally called by Lib, On the other hand, the other side of the static lib-all_load Should not be set for the application level, or the app will not thank the "duplicate symbols" -linker error. To solve this issue now I want to use force_load instant of load_all, because it is due to documentation This is like all_load, but there is a problem with the force_load for the pass path or lib file rather than just all the paths, I have no clue, which is to give the path or file as a parameter, h Let's pass it through the encoded project- or target-settings, all the syntax-possibilities in my mind, instead of the first one parameter in the xcode, it takes another linker into the thinking ...

Openmp usage in C++ object constructors -

Can I use OpenMan in Constructors of C ++ Objects? What will be done, when will such a constructor be with an global stable object? Yes imagine that the constructor will call the OpenMP function. One other issue, I do not know, it may depend on implementation. I'm absolutely certain that the Pithi implementation for the global stable object should be OK. Static Initializing If something is difficult to get the right, keep in mind that the stable object is started before the main.

c++ - How do I get a string or stream into a CStreamFile? -

This question might look a little too specific, but I think I want to give it a shot here because I have found That's some great programming answers in the past. I am modifying the open source program for the project on which I am working. I have visited and posted the tinycard message board, but I did not find the answer, which I am looking for. I'm having trouble wrapping my head about integrating a small XML converter class, I wrote in the loading function of tinycad. A small background about me: I have no experience with MFC or Visual Studio, but this is what I use to use for C ++ and iostream syntax (cout, cin , New, etc.), so I do not use the old C code (like printf, sprintf, malloc, alloc, etc.), I usually want to finish my programs in QT I write, Ekin has told me that the project I would like to modify an existing program to save time. I do not know if I want to learn something completely foreign, then he will save that time, but I keep back. I have read a sma...

iphone - How do I add the UIApplicationDelegate to the end of the UIResponder chain? -

मैं सामान्य कार्यक्षमता के लिए एक IBAction विधि प्रदान करने का प्रयास कर रहा हूं जो कि विभिन्न भागों में आवश्यक है ऐप। यानी लॉगिन रूपांतरित किया गया है, और अगर यह एक अधिसूचना में परिणामों की पूर्ति करता है जो सभी लोड किए गए दृश्य नियंत्रकों को इस घटना पर प्रतिक्रिया देने की अनुमति देता है (अज्ञात से प्रमाणीकृत संक्रमण) @interface MyAppDelegate: NSObject & lt; UIApplicationDelegate & gt; {...} - (IBAction) लॉगिनटैप: (आईडी) प्रेषक; @end मैंने आईबी में सबसे पहले उत्तरदाता को उस बटन पर कार्रवाई की है, लेकिन उत्तरदाता श्रृंखला MyAppDelegate को जवाब देने का मौका नहीं देता है। मेरी समस्या यह है कि, मैं प्रत्युत्तर श्रृंखला के विभिन्न हिस्सों में विधि को दोहराना नहीं चाहता, मैं इसे एक सामान्य वर्ग में जोड़ना चाहूंगा जो पहले से ही उपवर्ग है। UIResponder श्रृंखला UIApplication के माध्यम से सभी तरह से जाता है, लेकिन ऐसा लगता है कि अंत है मेरा UIApplicationDelegate भाग लेने के लिए नहीं मिलता है। मैं सम्मिलित करना चाहता हूं या अपने ऐप प्रतिनिधि को प्रत्युत्तर श्र...

html - jquery regex .* not working in jquery -

use jQuery to find a button using one page "id = btn. ar" Effort. No one even matches, even if the button is clearly on the page. Is there something else about * Is Jquery different from other Regex? The button exact ID is BTN clear, so it is clear that BTN. * R $ ("id = btn. * Ar") should match If I'm right to you I understand the way, so it should work: $ ('button'). Filter (Tasks) {return.id.match (/ ^ BTN. * AR $ /};}) Do_something ();

c++ - Member versus global array access performance -

निम्नलिखित स्थिति पर विचार करें: class MyFoo {सार्वजनिक: MyFoo (); ~ MyFoo (); शून्य करना कुछ (शून्य); निजी: अहस्ताक्षरित छोटी बातें [10]; }; वर्ग माइबर {सार्वजनिक: मायबर (अहस्ताक्षरित लघु * वैश्विक लेख); ~ MyBar (); शून्य करना कुछ (शून्य); निजी: अहस्ताक्षरित कम * चीजें; }; मायफू :: माइफू () {आईटीआई; के लिए (i = 0; i & lt; 10; i ++) यह- & gt; चीजें [i] = i; }; मायबारा :: MyBar (अहस्ताक्षरित लघु * वैश्विक लेख) {यह- & gt; चीजें = वैश्विक लेख; }; शून्य MyFoo :: doSomething () {int i, j; J = 0; के लिए (i = 0; i & lt; 10; i ++) जे + = यह- & gt; चीजें [i]; }; शून्य MyBar :: doSomething () {int i, j; J = 0; के लिए (i = 0; i & lt; 10; i ++) जे + = यह- & gt; चीजें [i]; }; Int main (int argc, char argv []) {अहस्ताक्षरित छोटा gt [10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; माइफ़ू * एमएफ = नया मायफू (); माइबर * एमबी = नया माइबर (जीटी); mf- & gt; DoSomething (); mb- & gt; DoSomething (); } क्या यह विश्वास करने का एक प्राथमिक कारण है कि mf.doSomething () mb.d...

javascript - JQuery Syntax Checker -

Does anyone know of any JQuery syntax validator or checkers? The braces are killing me. JSLint and a live demo site JSFDial You will be able to ensure that something is valid and is running properly As stated, most IDEs will validate your JavaScript. Eclipse, Netbeans, PHPEd and so on are all Javascript checkers.

ASP.NET: Async postback as I type in a text box -

I have a text box control on one page that I want to use to filter the grid. I would like to textbox control back to the page asynchronously, as the user type in values ​​in the text box; Preferably at a fixed interval (i.e. 500 ms after waiting for typing before the user is posted.) How can I complete this in ASP.net? I know that the updated panel and text box text-centered event does not tell me what I want because it does not fire as a user typing, only after the control is focused or if the page is posted in any other way is. I do not even want an auto-complete functionality, is there any control what I want to do for me? You can use jQUery, fire it on the keyway () event, and one Set the setTimeOut method before firing the AJAX call. $ ("# id input") Keyboard (function () {var $ value = $ (this); if (this.value! = This.lastValue) {if (this.timer) clearTimeout (this.timer); msgbox.css ({"background-image" : "None"}) .HTML ('& lt...

C++ Windows Form Application Mysql Connection -

I can not figure out how to connect to mysql in my windows form. I have established all the proper libraries and have included them, not the issue. The point is that I can not find a tutorial when joining mysql. I have found some console applications, tried them, but for some reason they do not work, I just have to send in the right direction, thanks. I do not know what you are using the library, but I recommend it is easy There are a great manual and many examples.

iphone - Avoiding infinite recursion synching between multiple NSManagedObjectContexts -

Setup: I have two managed reference sets (on the iPhone app) a main reference I For the most questions and background reference, I use it for long lasting work in the background. I have setup notifications for NSManagedObjectContextDidSaveNotification against each managed object context. In response to the notification, I call the merge changelinksDidSwice notification to sync. It is also a necessity that at any time things should be changed in the main context, I need to run some jobs in the context of background, because things have changed now. It works fine, as long as only typing in one of the references. In this case, writing on main context, however, if I write on background reference, then it causes infinite loop. Saving the background context triggers the information in the main context, which in turn merges into the changes and activates its information raised from the background context. It triggers background background for your background jobs, which (if they wri...

cocoa - NSObject may not respond to method -

There are some questions about this, but none of them helps me. I can not understand that things are "a class system What is it about calling? " I put an NSObject in the interface builder. I applied it to sub-squares I added the object to a table view. I applied the methods to populate the table view. To populate the table view, I used an array declared within the object. I tried to add some random objects. All the methods are working perfectly I have implemented a "add some" method which takes a logic and adds an object to the array, then it reloads the table view. No warning I add an outlet to the APDEGet class. This outlet refers to NSobage, which cares about the table view. But, when calling ... ... I have a warning: No response to 'NSObject' Maybe some add '[...] That method is never said that I can not add anything. Is there any concept that I do not have about things like messaging, function calls and Catching me Thank you for your...

ehcache - Caching Pattern: What do you call (and how do you replace) OpenSymphony OsCache "group" paradigm -

आपके कैश गुरुओं के लिए एक कैशिंग समस्या। प्रसंग हमने कई सालों तक ओपनसिंफोनी के ओस्काच का उपयोग किया है और एक बेहतर / मजबूत / तेज़ / सक्रिय रूप से विकसित कैशिंग उत्पाद पर जाकर विचार किया है। समस्या > हमने ओस्काच की "समूह प्रविष्टि" सुविधा का इस्तेमाल किया है और इसे कहीं और नहीं मिला है। संक्षेप में, ओस्काच आपको 'प्रविष्टि प्रविष्टि समय' पर एक या अधिक समूहों को निर्दिष्ट करने की अनुमति देता है। ओसकाच उदाहरण इस पद्धति का उपयोग करते हुए यहां उदाहरण कोड है: बाद में आप "प्रविष्टियों का समूह" को अमान्य कर सकते हैं। वस्तु [] समूह = {"स्तनपायी", "उत्तरी गोलार्ध", "क्लॉवेन-पैर"} myCache.put (myKey, myValue, समूह); // बाद में आप सभी "स्तनपायी" प्रविष्टियों को myCache.flushGroup ("स्तनपायी") // फ्लश कर सकते हैं या सभी 'क्लॉवेन-फ़ुट' myCache.flushGroup ("cloven-foot") को फ्लश कर सकते हैं वैकल्पिक: मैटर तंत्र हम एक पूर्व टीम के सदस्य द्वारा लिखी गई एक और घर-उगाही कैश क...