Posts

Showing posts from July, 2012

python - Wxpython - setting background color of a listctrl of a CELL, not of the entire row -

Is it possible to set the background color of the cell in a wxpython listctrl object? I found SetItemTextColour () and SetItemBackgroundColour () but both change the color for the entire line. Any thoughts? Thanks! You want to switch to UltimateListCtrl to achieve your goals, For example, to complete your goals, see their sample's single-cellular background adjustment. You can also checkout AGW for more information and updated version. wx.lib.agw import from ultimatelistctrl as ulc self.uListCtrl = ulc.UltimateListCtrl (auto, -1, AgwStyle = ulc.ULC_REPORT | ulc.ULC_SINGLE_SEL)

c# - Lambda expressions - select operator -

I would like to know how to write a liner (query using lambda expression in standard dot notation). I have an array of names, and I want to retrieve a new array of names based on a statement. Here is: order an array of names, and return a new list by that name which starts on a specific letter (letter M). This is my current array: string [] arrNames = {"Mike", "Zach", "Ella", "Allen", "Joe", " Roger "," Tito "}; I have to return such names as: Mike, Roger, Tito, Zac - These 4; The other 3 names (Alan, Ella and the names that begin with a letter starting with the letter "M" in alphabetical order, this operator is not the same as using "start with". Name of the names is selected I would like to receive all those names which are in alphabetical order from this letter and (i.e. name starts with M. jeed) . "M "See the alphabetical sequence with or above Mitja var result...

c++ - What type for operations on pointers -

I have searched a lot, but nothing could be found useful - but then I am not sure that I am the right thing Search for Is there a scalar defined by standard that should be bigger than at least one indicator? To wit. Sizeof (?) & Gt; = Sizeof (Zero *). I need this because I am writing a small garbage collector and want something on the lines of this: structure tag {uint32_t desc: sizeof (uint32_t) * 8-2; // To type the indicator UIT 32_t Free: 1; Uint32_t Symbol: 1; }; I think that is valid according to standard (if we are on it, I was quite surprised that sizeof (uint32_t) * 8-2 bitfield is valid for definition - but VS2010 Allows). So what size_t does this requirement? EDIT: After going ahead with some reasons for joining both C and C ++ (well and I thought they would be similar in that regard), I actually got one of them (I do not really need C ++ for this part of the code and I can add C and C ++ together that should work). And the CAM in this case seems to be ...

jquery - jScrollPane Tabs - How to make them fadein/fadeout? -

I have been able to work, how can I make feedin / feedout? I tried to add a delay and a feedi / feed out to show () and hide () , but this does not work either or this tab Shows where you need it. Here I tried to modify that code, everything is similar to the code on the jscrollpane site. & lt; Script type = "text / javascript" id = "sourcecode" & gt; Create $ (function () {// "tab" $ ('tabs') Each (function () {var current tab, ul = $ (this); $ (this) .fund ('a'). Function (i) {var a = $ (this) .bind ('click', function () {if (currentTab) {ul.find ('a.active'). RemoveClass ('active'); $ (currentTab) ) .hide ();} currentTab = $ (this) .addClass ('active') .attr ('href'); $ (currentTab). Show () .jscrollPane (); return false;}); $ (a .attr ('href'). Hide ();});});}); & Lt; / Script & gt; Any kind of help is appreciated. Maybe this? Do you want to fade? Scroll...

Java array of Hashtables -

I need an array of hashtable in such a program which is collecting all the words from the given set of documents. The array has a hashable string of index 1 - & gt; Double which stores a word, and calculates it for Document 1 (array index 100 = hashtable of document number 100). I do not need help using this data structure, I declare the hashtale array as follows: hashtable & lt; String, double & gt; [] H1 = new hashtable & lt; String, double & gt; []; ... but it does not compile. (Note: In the above declaration, the above declaration is dual instead of an integer.) Question: How do you create an array of hashtables that are string-> Double ??? stores bus access @SuppressWarnings ("uncheck") hashtable & lt; String, double & gt; [] H = (hashtable> string, double> gt; []) new hashtable & lt;?,? & Gt; [10]; H [0] = new hashtable & lt; String, double & gt; ();

android - Stack ImageView on top of surface where camera preview is running? -

I am trying to display an image at the top of a surface where the camera preview is running. So far, I have a camera running using a SurfaceHolder, I thought I could use the frame layout to pile an image at the top of the camera preview, but I do not know how to go about it I prefer codeat program, but any help is appreciated! Thanks Rather than using the frame layout, you can use a relative layout , Which uses z-ordering. Just insert your image inside the relative layout after your surf holder and it will appear above it.

c++ - Rotate Over Own Axis -

I am trying to build a car and I am starting with a polygon. The physics of the car is done very much, but when the car is steering, it is not facing the right position. Then I glRotated (_angle, 0, 0, 1) using GLRatated; Where _angle degree is the car's angle, but it does not rotate with its axis. How can I fix this? The code is here: zero car :: draw () {vector 2D minutes = _position - _size / 2.0; Vector 2D max = _position + _size / 2.0; GlColor3d (0.8, 0, 0); GlLoadIdentity (); Glotched (_gal, 0, 0, 1); GlLineWidth (1.5); GlBegin (GL_POLYGON); GlVertex3d (min [0], min [1], 0); GlVertex3d (maximum [0], min [1], 0); GlVertex3d (maximum [0], max [1], 0); GlVertex3d (minimum [0], maximum [1], 0); GlEnd (); GlPopMatrix (); } Thanks. glRotate * Rotate around the origin You can translate back to original, rotate and then You can translate from but you probably do not want to add _position to yourself: zero car :: draw () {Vector2d min = - _size / 2.0.0; Vector 2...

android - Get data from sent SMS -

I send Android sms, every time I try to retrieve the data. Data form: Destination phone number Delivery time SMS entity P> Does anyone know? Receive SMS in the Sent Box. Public listing & lt; Smsreep & gt; GetOutboxSms () {if (null == reference) {New Array List & lt; SmsRep & gt; (); } Uri Uri SMS = Uri.Parse ("Content: // SMS / Sent"); Cursor cursor = context.getContentResolver (). Query (Yuri SMS, empty, empty, empty, empty); & Lt; SmsRep & gt; OutboxSms = cursor2SmsArray (cursor); If (! Cursor.isClosed ()) {cursor.close (); } Return Outbox Sms; } and the method of handling the data in the Sent Box: Public Stable List & lt; SmsRep & gt; Cursor 2 SSRU (cursor cursor) {if (null == cursor || 0 == cursor.gatecount ()) {new array list & lt; SMSRip & gt; (); } List & lt; SMSRip & gt; Message = new arreelist & lt; SMSRip & gt; (); Try (for cursor.moveToFirst); Cursor.isAfterLast (); cursor.move...

visual studio 2010 - Windows Phone Application Project Type Unavailable in VS2010 -

Image
I recently had to restore the OS to my Dev box and now I am in the process of reinstalling various applications. I am I had previously installed the WP7 SDK without any problems but unfortunately I'm having trouble around this time. The only type of project that I made available for the Silverlight in Windows Phone category is what I have downloaded from an online template. when I try to open it Or any WP7 project I created earlier, then "Project type is not supported by this installation." Error I'm not sure what I'm missing. I have followed the three steps listed, so I have set up SDK, Dev Tool and Dev Tool. The installation of VS2010 looks right because I can create asp.net and silverlight applications and run them without problems. Has anyone found something like this before? Edit: I installed Service Pack 1 for VS 2010, but it has not helped unfortunately. Edit: I have reinstalled Windows Phone Dev device and that installation did not send ...

memory leaks - View reuse in fragments android -

I'm trying to save my section in my piece, but I worry that I'm leaking my activity I am Here's what I'm doing: @ Override public view crate view (LayoutEfterter Inflator, View Group Container, Bundle State) {if (mView! = Null) {see oldParent = mView.getParent ( ); If (old bankruptcy! = Container) {((Group View Old Guardian) .removeView (mView); } Return mView; } And {mView = inflater.inflate (R.id.fragview, zero) returns mView; }} I'm worried because I know that all the scenes are holding in any context and I do not know whether this is the reference context or application reference that is flown by the flyer. Perhaps it is a good idea to create a visual view and set its properties using getActivity (). Instead of using Flower, getApplication () I appreciate any feedback on this. Thank you! Edit: Confirmed activity leak, although this code does not work great: * ( I am trying to save my section in my piece, but I worry that I am leaking my activ...

windows django server -

I inherited a Windows server and I have to assign a design app to it. Have tried benchmark HTTP servers with Django support on this forum? Which is the fastest? Use of my application will be: - Not so much written to DB Massive use of the admin panel Many Display results Have you either seen or? They distribute Apache / MySQL / PHP-and-Perl on both Windows platforms. But you need more because neither Python is included to see it move forward Note, you can get problems for an example see it for an example. PS privately, I will only get an account that supports the Denggo (such as webfaction dot com) and do not screw around it.

Set As Default Home Page With JavaScript - FireFox & IE -

What are the best code to set up a web address in the form of a default home page on the client? (pageload) For IE8 and Firefox 3 (or more) Thanks 4 Meditation of the future Best regards You can not do this, it depends on the user.

css - Border around HTML Faux Columns -

I am working on a webpad and I will put the boundaries around the floating devices, which I can not get better in the absence of the column Call me I know this is very basic, but for some reason - incompetence - maybe I can not get it to work Process: I have two divs left and right, these divisions are nested in other divisions I want to keep the boundary around Code: & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Title & gt; StackOvervlow & lt; / Title & gt; & Lt; Style type = "text / css" media = "screen" & gt; Body {width: 900px; } #Weather (border: 2px solid brown color;} # container {width: 600px; left swim; background color: # 678;} # sidebar {width: 200px; right boat; background color: biscuits;} #footer {clear : Both; Text align: center;} gt; & gt; & gt; body & gt; & lt; div id = "h...

android - How to close all the activities of my application? -

I have found an application with many activities, for example: Activity 1 - & gt; ; Activity 2 - & gt; Activity 3 - & gt; Activity 4 And I would like to stop all activities from any activity and return back home. You can get it by using BroadcastReceivers : Create BaseActivity in this way: extends the public square base activity activity {Private Killrescrew mKillReceiver; @ Override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); MKillReceiver = New KillReceiver (); Register Receiver (M. Kail receiver, Intent filter.cent ("kill", "Spartan !!!")); } @ Overhaired Protected Zero Destroy () {Super. Onesteroy (); UnregisterReceiver (mKillReceiver); } Private Final Class KillReceiver Broadcast Receiver Expands {@ Override Public Records on Receive (Context Reference, Intention Intention) {Finnish (); Boost your activities that code base activity . Whenever you want to clear the stack: int...

Identify machine from a Java desktop app? -

I am creating a Java desktop app, and I specifically want to be able to recognize that the code is current On what machine is running on. (This does not require any personal data, it only needs to be able to separate a machine from the other, and to ensure that the machine remains the same, the OS keeps a lack of restoration.) Ideal Any advice on how to do this platform will be independent? You can use the MAC address of your network hardware, usually it also avoids the OS Restore . I had written my laboratory management software for test automation earlier this year, and machines were to be uniquely identified. He caught a script from a known network share, found his Mac address with the file name. I did this because I was testing OS setup, and my automation had to be saved from reboot. This example has to show how to do it. I do not use Java, however, so I can not tell you that this is the old style, or there is a better way to do this: Warn if you use the software L...

jQuery UI Drag and Drop with .trigger() -

I am trying to drag and drag a 'drag' manually without contacting a mouse / user . So far I have been able to set up the jQuery UI for drag and drop but using the trigger () method has been unable to trigger drag and drop. Can someone help set this up? My code is so far: $ (function () {$ ("#draggable"). Draggable (); $ ("#droppable") .droppable ("$ - draggable"); $ (this) .addClass ("UI-state-highlights") .Find ("p") .html ("dropped!");}}}; $ (' ). Triggers ("Drop", $ ('# droppable'))} Thanks in advance! Easing things Whatever I want to be able to do, it calls the 'drop' method anywhere out of droppable (), but I will always need to specify event and UI objects. Why not trigger the trigger by creating a custom context? Then you can trigger it yourself: $ (function $$ ("#draggable"). Draggable (); $ ("#droppable") .Droppable ({drop: function...

asp.net mvc 3 - UrlHelper.GenerateUrl -

Can you provide a sample using Urlhelper.GenerateUrl within the Action Filter using only the Target Controller and Action Are you var url = UrlHelper.GenerateUrl (empty, "action", "controller", empty , MargTab.Rout, HttpContext.Current.Request.RequestContext, Incorrect); or var urlHelper = new UrlHelper (HttpContext.Current.Request.RequestContext); Var url = urlHelper.Action ("verb", "controller");

Newline "\n" in TextField java -

I am creating strings (3 different objects) and at the end of the string when I print in the console, A new line is given what is expected, but when I use settext in the textfield, I see a line, is there a way to get a new line in the text area? while (itr.hasNext ()) tx + = "N" + el.getnombre () + "" + + + "\ n"; Println (TX); Textfield.setText (TX); JTextField or TextField (Not sure what you're using) are only for single rows. . If you want a multilingual text display and you are using swing, then use a JTextArea if you are not using swing, please tell us which GUI library you are using, this one Important details, which should mention your question.

JPA one to many map key -

मेरे पास निम्न है @OneToMany (मैप किए गए = "भूमिका") @मैकेके ( Name = "role.name") निजी मानचित्र & lt; स्ट्रिंग, यूज़ररोल & gt; UserRoles = नया हैशमॉप & lt; स्ट्रिंग, यूज़ररोल & gt; (); मैं मानचित्र के लिए कुंजी के रूप में UserRole में भूमिका ऑब्जेक्ट के नाम विशेषता का उपयोग करना चाहता हूं, मैं यह कैसे प्राप्त कर सकता हूं। @MapKey (name = "role.name") काम नहीं करता है मेरे UserRole.java में निम्न है @ManyToOne @JoinColumn (name = "roleId") निजी भूमिका भूमिका; जेपीए में @ मैकेकी केवल एक स्थानीय क्षेत्र ही हो सकता है। यदि आप ईक्लिप्स लिंक उपयोग कर रहे हैं तो आप मैप कुंजी के रूप में एक विधि का भी उपयोग कर सकते हैं, ताकि आप UserRole में एक getRoleName () को परिभाषित कर सकता है जो भूमिका का नाम देता है, और इसका उपयोग @MapKey के साथ करें।

c# - log4net: Specifying different layouts for different kinds of messages in the same RollingFileAppender -

Apparently (or has been changed since?). So how do I write a notification message with the layout and the exception with another layout, both for the same rolling tile? Is it possible to specify two different layouts in the same appender, or is there any other solution? This is not really an issue of file (api), but lockingmodel is very much behind it . As you have said, "Random" you can use Minimal Lock, though note that there are two main disadvantages: Compared to exclusive lock Bad performance, because file lock has been acquired / released for every message. This prevents only two processes from writing together. It may still be that more than one process attempts to write a file. In this case, only really one will be given, all other errors are received and their messages are lost (see also). To make it interruptible, you can write your own which uses a mute x internally, it is fast (A), file locking of minimized lock and (B) still allows all proces...

php - Deleting files using CodeIgniter? -

I'm not sure it's a work to delete a file (where an image is). $ this-> Load-> Assistant ('file'); However, this list lists that this function has to delete the whole directory, and there is no mention of how it handles different files (if a path is given only for 1 file). Before I started testing with it, I thought I would check what someone has done before this problem? I just want to use a codeigniter function to delete the uploaded images (user profile images say) but I am unable to find anything in the documentation / user guide Helps me achieve it (yes, I know that I need proper permission for first and everybody, but it is beyond the scope of this question). About Unlink () What was I hoping to do in a CI function that would allow me to "allow someone to be removed" Stupid or other factors like "file is in use". I got unlinked () sometimes does not work (throwing me without any errors) so why did I ask ... As I posted...

c++ - stl compliant container -

I'm curious to emphasize on an STL-compliant container (or promoter), I understand that Their either the same, or very similar) I have seen some examples that are called STL-compliant (for example, and clearly the actual STL containers), but I am not sure which component of those containers I want. Whatever I can collect, at least these things are needed: STL-compliant artists (current STLs are only bi-directional Or use higher velletters, it is not known that it requires a mechanism (default for std) to define an allocation or It just happens - the opportunity is still going to be known that "STL-compliant Iterator" :: Allocation ), as well as co (Still trying to figure out what is the last part) Public typing for metaprogramming (indicator type, const indicator type) , Reference type, value type, const reference type, difference type, maybe some other?). Side Question: What is a difference type 'Generic' (i.e. using metaprogramming / templ...

mySQL query, data as a php variable? -

I want to select all the information for today, such as a variable: But instead of doing a new query for each, I just like Come wish: returned Print $ ba = result; $ BB = Total number of results returned; $ BC = Total number of results returned; $ BD = Total number of results returned; How would I go about doing this? Usage: SELECT SUM (case when t.cat = 'BA' then 1 ELSE 0 END as BA, SM (case when t.cat = 'BB' then 1 ELSE 0 END) as BSB, SUM (case when TCAT = 'BC' then 1 ELS 0 ADD ) BSD, SM (case when TCAT = 'BD' then 1 ELSE 0 ADD) BSD from your telebali TT where '03 / 28% 'like TDT's

SQL Server 2005 problem with ROW_NUMBER() OVER (ORDER BY ...) -

This question is related to the previous question ... see "View SQL Server 2005 how to set a record when something like operator Using ". The following tasks ... with as the xx (select the case when mycol = 'finance' then 1 when mycol 'finance'% then 2 when '% Finance%' like McLeek then choose RNK as 3 End * * * from MyTable * * * * * * * *% * like Micix * xx command xx.rnk, by xx.mycol); But I really want to do this, because I'm using the page through the record from the server ... with xx as (Select case when t.term = 'finance' then 1 when 'finance%' such as t.term then 2 when like t.term '% finance%' then 3 end rnk, *, row_number (more than command rnk By T. TMM) as TLR from TLTR TM where '% Finance%' like TTRM * * * Select from XX *, where between Rathore 11 and 20 - page # 2 xx.rnk , Sequence by xx.mycol; I'm getting an error "Invalid column name 'rnk'". Do anyone have a...

html lists - Use CSS to alternate ul bullet point styles -

I would prefer alternative list-style-type properties for the ul list, so that the external one is disc, then an internal ul The list is a circle, one inward one disc, and so on. Basically, what do I want: & lt; Ul & gt; & Lt ;! - Use Disk - & gt; & Lt; Li & gt; Household Advertising & lt; / Li & gt; & Lt; Li & gt; & Lt; Ul & gt; & Lt ;! - Use circle - & gt; & Lt; Li & gt; Household Advertising & lt; / Li & gt; & Lt; Li & gt; & Lt; Ul & gt; & Lt ;! - Use Disk - & gt; & Lt; Li & gt; Household Advertising & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li & gt; Household Advertising & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li & gt; Household Advertising & lt; / Li & gt; & Lt; / Ul & gt; How do I use CSS? In this way ... li {list-style: circle; } Li li {List-style...

java - Binary to String trouble -

Hello I am trying to write a program that covers the binary entered by a user in a string of text. I've hit one type of blockage, I can get my program to hide "01110110" for "v", but once I tried to do something like "0110100001101001", it gives me the word "hi" Gives the symbols instead. Below is the source code that I am using. P.S. Thanks, you still help in trying to get an understanding of Java. import javax.swing.JOptionPane; Public class binaryettext {public static zero main (string ARG []) {string b = joptionpan.SonyputDialog (blank, "enter binary"); Int charCode = integer.centant (b, 2); String k = new character ((four) charcoda) .string (); JOptionPane.showMessageDialog (zero, K); }} If your string exceeds 8 bits, then you have to break it Each 8-bit segment is independently down and parsed, such as: int charCode; String k = ""; String b = joppenpen.showinputdialog (empty, "enter binary")...

eclipse - Build path incomplete only in some workspaces (Android) -

I have more than one Eclipse (3.52 "Galileo") workstation so that I can put together related projects in the same vertical area. File and gt; between them Switch workstation I recently copied a good, work-ready project for a different workspace, to "Import File" to import it into my new workspace, But after a clean and build, " this project was not created because its way of construction is incomplete. Class file for Java.lang.Object could not be found. Fix the build path, Then this project Try to make the crop to "error. > Produces all my other projects properly I thought that "path creation" search path is referred to Java or SDK files, then it is only a project (... a project that contains Works fine in a different workspace) but might fail? I have tried to restart Eclipse, switching back and forth between workspaces, making another clean and constructing, but there is no luck. any idea? Thanks in advance. It may be a bit ...

actionscript 3 - AS3 how to access movieclip from a child added in runtime -

I have created a child that will be added on runtime How do I watch movie clips from inside the main place of children? The best practice is already referenced from the container of both the child, on stage clips this.myAddedClip.otherStageClip = this.alreadyOnStageClip; It avoids hardcoding structural information in a child case, which is an object-oriented no-no, and usually leads to spaghetti code. As a rule of thumb object, usually only "know" about your direct children. As you can see from this example that the child object still ends in the context of another, but there is no need to know that it is already on stage, or its original object etc. is.

java - Configure log4j log level using an external configuration file -

Is it possible to configure log4j log level by using the external configuration file? Instead of configuring a user log level in the Log4j.properties file, I would like to configure the log level by using a project configuration file. WulfgarPro It depends on your build / make tool for example : I do the same in Maven. Maven has the "filtering" feature that you can enable Maven filtering will replace $ {some_property} in all your resource files, which is the value of "some_property" in Maven. In this way I change my Log4J properties if I am in dev or prod mode. Besides, I do not know that log4J has such a feature. I'm sure that is possible through ant.

android - select a contact and get phone number and call it -

When I click on a contact, I do not get a phone number, I only get a contact name, but no number No. I was sent for a related post but still not satisfied, please guide me. My code is as follows: package com.Call_setup; Import android App Import android.content.ActivityNotFoundException; Import android.content.ContentResolver; Import android.content.Intent; Import android.database.Cursor; Import android.net.Uri; Importroid.os.Bundle; Import android.provider.Contacts.People; Import android.provider.ContactsContract; Import android.widget.ListAdapter; Import android.widget.TextView; The public class extends call_setup activity {/ ** is called when activity has been created first. * / Intent column; Personal list adapter mAdapter; PbContact public text view; Public stable string PBCONTACT; Public stable final distance ACTIVITY_EDIT = 1; Personal fixed final distance ACTIVITY_CREATE = 0; Private static final difference PICK_CONTACT = 0; Private static final difference PICK_CONTACT...

audio - Block "play" headset button in an Android app -

I am writing an Android app that reads external hardware via microphone input. My problem is that sometimes the phone thinks that the incoming sign through Mai is pressing the "play" button and the music starts playing (the play button shorts microphone on the ground and some of the signals I'm reading are quite close ) I have seen applications which block the play button from a headset. I wonder how can I add this functionality to my own app? Just an estimate: Set up a broadcast ACTION_MEDIA_BUTTON for the intent of the receiver and handle it so that it's music. App does not pass on.

How to get Jquery Ajax Readystates -

How can I know the preparations for an AJAX request via jquery? In general, without using jquery, we will send an AJAX request like this: http.open ("POST", url, true); Http.onreadystatechange = function {if (http.readyState == 4 & amp; http.status == 200} {// do something}} So I can easily track I can use the code generated from 1 to 4 using the code above, and take the necessary action as if the ready list is 1. But how to prepare, through a jquery AJAX call Can I track values? I am making an Ajax call through jquery like this: $ .post ('ajax / test.html', Function (data) {$ ('result') .html (data);}); . You have different callbacks (possibly evil "ready state" But it is enough for an indicator to have the possibility of passing: Preceded (jqXHR, settings) Function A pre-requested callback function, used before sending the jqXHR (jQuery 1.4.x, XMLHTTPRequest ) object. Use this to set a custom header, etc. jqX...

php - how can i access a variable defined inside a for each loop outside the loop? -

यहाँ मेरा कोड है ... foreach ($ relatedStories- & gt; getResults ) $ की कहानी के रूप में): $ कुल + = $ कहानी- & gt; getEstimation (); endforeach; $$ संबंधित स्टोरी मूल्यों की एक सरणी है। अब मुझे बाहर कुल मूल्य का उपयोग करने की आवश्यकता है। मैं ऐसा कैसे कर सकता हूँ ???? बाहर चर $ total परिभाषित करें सूचित करते रहना। ( $ total = 0; )।

iphone - How to access to navigationItem when I am in a view controller in tabBar? -

I have a controller in the tabs tab and the tabbar is in the navigation controller. I want to reach the navigation when I'm in a view controller in the tabbar. Usually, when I made a navigation item number, I used to do it (if I'm in a view controller) [[self-navigation itam] setTitle: @ "menu"] But I'm in a view controller, tabbar in navigation controller does not work like this. A view controller is the navigation item property, however, while viewing the controller in the tabbar there is a navigation item property, which does not work. I think that this is right logical. Thank you for reading my question. Considering its view controller hierarchy & gt; UINavigationControler & gt; UITabBarController & gt; Custom Configuration Controller (CVC) The controller in a tab bar controller maintains a reference through this property for the tabBarController property. In cvc , you can access navigation items like this: self.tabBa...

file - If i install a package say "mypack.apk" ,then will "/data/data/com.Android.mypack" will get created always -

फ़ाइल फ़ाइलडाइ = getFilesDir (); लॉग। V ("टेस्ट", "फ़ाइलीड --- & gt;" + fileDir.toString ()); // प्रिंट FILEDIR --- & gt; /data/data/com.Android.mypack/files स्ट्रिंग strNewFileName = "test1.txt"; स्ट्रिंग strFileContents = "परीक्षण पीआरजी, कुछ भी नहीं"; फ़ाइल नई फ़ाइल = नया फ़ाइल (फ़ाइल डीआईआर, स्ट्रॅनवेफ़ाइलनाम); कोशिश {बूलियन filestat = newFile.createNewFile (); लॉग। V ("टेस्ट", "फाइल बनाएं = & gt;" + filestat); // एक सफल निर्माण का संकेत देने वाला प्रिंट्स FileOutputStream fo = नया FileOutputStream (newFile.getAbsolutePath ()); fo.write (strFileContents.getBytes ()); fo.close (); } पकड़ (IOException ई) {} प्रोग्राम को एक एंड्रॉइड टैबलेट के साथ चलाने के बाद। मैंने टेबलेट को घुड़सवार किया और फाइल को आंतरिक संग्रहण में खोजने के लिए फ़ाइल एक्सप्लोरर का इस्तेमाल किया। लेकिन मैं "/data/data/com.Android.mypack/files" जैसे किसी पथ का पता लगाने में सक्षम नहीं हूं। यह पुष्टि करने के लिए कि एक नई फ़ाइल ब...

visual studio 2005 - ASP.net session alternative -

I have a webform that is a survey for users to use a sequence of questions. I am storing the received sequence. The problem with this implementation is: Suppose that the user is on session 3 and press back, he will get the answer of session 2, which he wants to change if he next presses next time, inform him All questions of session will not be filled 3. Is there a substitute for session variables that will allow me to solve this problem? You can store the step number as a hidden field on the form, To be deposited with them. In this manner you can react to the relevant phase even if the user uses the back button.

asp.net mvc 2 - Categories and Subcategories MVC2 -

At least for me there is a big problem. I have categories and unlimited subcategories. The table looks like this: ID Parent_ID name 1 tap ride 2 1 gallapada 3 empty figure 4 2 trappers And there is a table in which a category is responsible for. The table looks like this: ID category_ID name 1 4 sharp 2 1 slow 3 3 high 4 2 less Now I want to retrieve them from the database and want to show them in my MVC 2 application like this: a field set for the first class, Subcategory items should be listed in the field with the checkbox in the fields before and for one I work with @ html.CheckBoxfor like. Has anyone got any ideas? I have been working on this problem since last week without any results. I repeatedly tried to solve the problem but it was not working. An example would be beautiful, thanks a lot! Thank you very much for your reply! Everything works fine! But how to make HPPoop with this model? And how is each checkbox checked or checked? He...

android - put ImageView src to HashMap -

कृपया पहले अपना कोड देखें: निजी अर्रेइस्ट & लेफ्टिनेंट; हाशमैप & lt; स्ट्रिंग, स्ट्रिंग & gt ; & gt; सूची = नए अर्रेलिस्ट & lt; हैशमैप & lt; स्ट्रिंग, स्ट्रिंग & gt; & gt; (); // ... ImageView temp = नया ImageView (MyApp.this); temp.setImageResource (R.drawable.icon); // ... हाशमैप & lt; स्ट्रिंग, स्ट्रिंग & gt; Map = list.get (i); Map.put ("pic", temp.toString ()); // "तस्वीर" एक छविदृश्य यहां मेरा प्रश्न है: मुझे पता है, map.put ("pic", temp.toString ()); गलत है। लेकिन सही तरीका क्या है अग्रिम धन्यवाद। हैश मैप में छवि आईडी को शामिल करने का सही तरीका हैशमैप का उपयोग करना है जहां ऑब्जेक्ट छवि आईडी (इंट) से मेल खाती है। यह कोशिश करो कि मैंने खुद पर यह काम किया है।

ajax - Google Analytics with asynchronous Calls to two different accounts -

I have a flash site that calls the JavaScript function to track events inside the app, before _gaq It is implemented in the section from Html and works perfectly well with one account: function custom tracker (clickEventName) {_gaq.push (["_trackPageview", clickEventName]) ; } But now my client wants to include special events from third party companies and they need to track in a different GA account. Before I try it on a live server, I would like to ask: function custom tracker (clickEventName) {_gaq.push (["_ setAccount", "UA-XXXXXXXXX- X "]); // regular account _gaq.push (["_trackPageview", clickEventName]); } Function customThirdPartyTracker (clickEventName) {_gaq.push (["_ setAccount", "UA-XXXXXXXXX-X"]); // New account for third party tracking _gaq.push (["_trackPageview", clickEventName]); } I got a stack similar question on overflow, but the answer was only '' to use the new asynchrono...

html - Footer always at bottom but without fixed height -

Can someone help me create HTML code on the basis of the DIV, in which the same result based on this table based code Is: & Lt; TR & gt; & Lt; TD bgcolor = pink & gt; Page content ... & lt; BR & gt; 111 & lt; BR & gt; 222 & lt; BR & gt; 333 & lt; / TD> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD bgcolor = yellow id = footer style = "height: 1%" & gt; Bottom ... & lt; BR & gt; 111 & lt; BR & gt; 222 & lt; BR & gt; 333 & lt; BR & gt; & Lt; Button onclick = "document.getElementById ('footer'). InnerHTML + '& lt; BR & gt; more footer ...';" & Gt; Increase footer & lt; / Button & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Body & gt; & Lt; / Html & gt; Add it as a CSS in your footer. #footers {status: fixed; Left: 0px; Bottom: 0px; Height: 30px; Width: 100...

css - why cant i find the control txt in this vb.net asp:repeater no matter what i do on rgroups itembound -

I can not find the control txt that is a text box in the repeater I have the rgroups itemdatabound event as ------------ itemdatabound code protected sub rGroups_ItemDataBound (ByVal this object, as ByVal e System.Web.UI.WebControls.RepeaterItemEventArgs) handle as rGroups.ItemDataBound dim DV DataRowView = TryCast (e.Item.DataItem, DataRowView) if DV is nothing isnot dim rptOrderDetails repeater = TryCast (e.Item.FindControl ( "rSubgroups"), repeater) dim Control1 As in control = rGroups. Items (0) .FindControl ( "txt") Dim txtbox textbox = DirectCast (Control1, such as text boxes) so rptOrderDetails isnot nothing then new DataView (dssubmenu) dv_co.RowFilter = "type = '' where dv_co dim + txtbox.Text + " '" rptOrderDetails.DataSource = dv_co rptOrderDetails.DataBind () end If end If end Sub ------------ repeater code & lt; asp: repeater id = "R group" Rnat = "server" & gt; & LT; HeaderTempla...

task scheduler thinks python script is still running -

I have a python script which in turn executes other python scripts. I put it on a WinXP task scheduler as a task. Talk Run - Command Prompt is opened, Sparks are flying, Magic happens ... After all the work is done, I have finished a good print script !! And to get back soon but Task Scheduler thinks that the work is still going on! So I tried to create a bat file which only makes a script call: script.py echo pyfinished I can not really see 'pyfinished' to surprise me ... A line with os.system ('cmd / k script.py') makes the process to survive until I can kill it manually.

javascript - Merging JS files using Shrinksafe -

Dear all, I need to merge all the javascript files into a folder using a scintiff in a file. I I am using the following AN script. But it is not working properly. & lt ;! - Merge JS files into a file in script folders - & gt; & Lt; Target name = "mergegp-js" & gt; & Lt; Echo message = "start merging" /> & Lt; Java fork = "true" dir = "$ {shrinksafe.util.path} / buildscripts" classname = "org.mozilla.javascript.tools.shell.Main" & gt; & Lt; Classpath & gt; & Lt; Pathelement location = "$ {shrinksafe.util.path} /shrinksafe/js.jar" /> & Lt; Pathelement location = "$ {shrinksafe.util.path} /shrinksafe/shrinksafe.jar" /> & Lt; Pathhelm Path = "$ {java.class.path}" /> & Lt; / Classpath & gt; & Lt; Arg value = "build.js" /> & Lt; Arg value = "$ {merged gpstatic.folder} / test / scripts / * .js> tempMerged.js...

.net - Release generating .pdb files, why? -

विज़ुअल स्टूडियो 2005 में क्यों रिलीज में संकलन करते समय .pdb फ़ाइलें उत्पन्न होती हैं? मैं रिलीज़ बिल्ड डिबगिंग नहीं करूँगा, इसलिए वे जेनरेट क्यों कर रहे हैं? क्योंकि बिना पीडीबी फाइलें, पता-स्तर डीबगिंग के अलावा किसी अन्य चीज़ द्वारा "रिलीज़" बिल्ड को डिबग करना असंभव होगा। अनुकूलन वास्तव में आपके कोड पर एक नंबर करते हैं, जिससे कि कुछ गलत हो जाता है (अपराधी को खोजने के लिए) कहते हैं, एक अपवाद फेंक दिया गया है)। यहां तक ​​कि ब्रेकपॉइंट सेट करना बेहद मुश्किल है, क्योंकि सोर्स कोड की लाइनें एक-से-एक के साथ (या उसी क्रम में भी) उत्पन्न विधानसभा कोड से मेल नहीं की जा सकतीं। पीडीबी फाइल आपको और डीबगर से बाहर निकलने में मदद करती है, जिससे पोस्टमार्टम डीबगिंग काफी आसान हो जाता है। आप यह कहते हैं कि अगर आपका सॉफ्टवेयर रिलीज के लिए तैयार है, तो आपको तब तक अपने सभी डीबगिंग करना चाहिए था। हालांकि यह निश्चित रूप से सही है, ध्यान में रखने के लिए कुछ महत्वपूर्ण बिंदु हैं: आपको भी अपने आवेदन को जांचने और डिबग करना चाहिए (इसे रिलीज़ करने से पहले ) "रिलीज़" बिल्...

c# - Downgrade asp.net Mvc from 3 to 2 -

I know this is a strange question, please do not flame me :) I have An existing ASP.NET MVC3 (Net Framework 4) application is required to "downgrade" to Aspen MVC2 (Net Framework 3.5) because our shared hosting provider does not support Net 4 (I know it's crazy But the idea is that in retail and the first beta came out in May 2009, from 12 April 2010 The following is not the point of the post). Can any device, or guide or process help? I'm losing a bit because I upgraded many applications but I never had to downgrade In addition to strict MVC, I am using a data layer with EF code (probably nhibernate would be the best tool thanks Edit : Hosting is changing The provider is not an option, otherwise I can not post it at all. I am personally against this downgrade - I fully I think silly - but still this is the only option. I will replace the hosting provider if your provider does not support .NET 4.0, then do you really want to build a long-term rel...

css - Word wrap different firefox, IE, chrome, mobile browsers -

I have an image with a fixed width and height background I want the text to have a fixed number of lines (3) . The text wraps in different browsers differently, sometimes an extra line is inserted, which goes beyond the background image's text. This means that I have to add / remove words from my text and to see that in every browser, the rendering must be constantly checked that it is in the same number. I guess the browser width / margin / padding so that the width of the container is different, or that the text is provided slightly differently in each browser (with greater or lower width). What will be the recommended practice for this? I want the container text to be longer than the 3 line, so I'm right to fix the container height Recommended practice does nothing like try to redesign so that background image / fixed height is not required and the text does not need to be limited to three rows. If this is needed by any type of person you have installed by you...

asp.net mvc 2 - Creating custom Html helper for datepickerfor(model=>model.date) from model -

I am making custom HTML support for my datepicker. I want to pass in mode because it's TextBoxFor (model = & gt; model.name) so what do I want, but I do not know how to do this Field name The value of the field I have made Public stable string date picturefront & lt; TModeel, TProperty & gt; (This HtmlHelper & lt; TModeel & gt; HTMLHelper, expression & lt; Func & lt; TModeel, TProperty & gt; & gt; Expression) {// Return Object. Name var expression text = expression. Helper. GetExpressionText (expression); field name string fullHtmlFieldName = htmlHelper .ViewContext .ViewData. TemplateInfo .GetFullHtmlFieldName (ExpressionHelper.GetExpressionText (expression)); The value of the field var metadata = modelmatetta.freem LambdaXpress (expression, HTML helper.jyzedata); Object value = metadata.model; // will be type TProperty

c++ - shared_ptr problems returning an up-cast version from a member function -

I am trying to share_ptr recently and I have run something in a strange case. The template member function which I want is able to return a shared _pitter of its derivative type. I'm running Visual Studio 2010, which has access to some new C ++ 0x standards, but I think shared shared APTR behaves equally. This works fine with the Pure Pointer I just have a dynamic_cast // Assume that we have a virtual function class base class: public stat :: enabled_space ____________ the_based_language; & Lt; Base Class & gt; {.... Template & lt; Typename DerivedClass & gt; Std :: shared_ptr & lt; DerivedClass & gt; Base Class :: getThis () {// I return the typing std :: dynamic_pointer_cast & lt; DerivedClass & gt; (Shared_from_this ()) had to put some code here to make sure; }} Edit : It seems that the function works properly, the problem was how I was using it. This is bad, for example, do the following: std :: shared_ptr> DerivedClass & gt; ...

C++ Debugging "smell" -

I was debugging a strange problem where an object VMT suddenly points to the base object's methods. class base {virtual zero foo () {}} class derived: public base {void foo () {}} derived derived * d = new; ... very complex fettling ... d-foo (); // help! Base: foo () is called !!! This was a bug effectively in the 'complex' code deleted; I will not go into details except to tell that boost :: noncopyable is your friend, and never under any circumstances does not ever roll their smart pointers classes. But my question is - does this kind of change of VMT have a good 'smell' that you are working with a deleted object? I think VMT 'gets' unrolled' on ' base during destruction'? Obviously this is very dependent on implantation, and I was 'lucky' that the memory was not crushed on ... Definitely what the question is ??? But IA says that this: I was 'lucky' that the memory was not crushed ... is wrong: you ...

entity framework - How to store information edited or created in more than 1 entities -

In my ASP.NET MVC application, I want to store information in many different organizations, which are edited or made Persons, know, ..). Then there are input fields for each attribute in the table of persons and the address table in my visual view. Now I want to accumulate values ​​in both institutions at the same time? Is It Recovering Using a View Modal? Or is there a better way? You can actually type a visual model which encapsulates all the entties you need for that view , But when it's time to store them in the database, you still have to do every institution individually, for example you have: // Here you are already Have caught their institutions; // We are in your verb // it is your reference, but please use // dependency injection in your controller ^ _ ^ var context = new dbContext (); Context.Add (person); Context.Add (address); // It will store all the instances you have added at one time context.SaveChanges (); SaveChanges () works as well when you u...

When are Magento rule-based product relations worked out? -

Magento's rule-based product relation (up-sell, cross-sale, etc.) is stored in a database table, and I They seem to update once at a time. Unfortunately, when someone does this or who triggers it, I can not get any documents. Is it: Cached, like a block, and ends after a certain time? Whenever you save a product? Cron? I really appreciate that someone can fill the vacant space for me, I am using Enterprise Edition, if it helps or makes a difference. Then I get product link data about a little related object that we are looking for here catalog / product_link , which uses the list / product object to retrieve linked object data. While writing grouped and bundled products in the chronobose, I have not found any such cases where the data is written in cron-job for actual data / cross-cell products. I will dig a bit, but it seems that the products are calculated on time savings. Hope this helps! Thanks, Jo

php - Problem with values on a foreach loop and how can I assign the correct value to the correct variable -

I have a blog, and I have a script to show my post (title-content-image) in another page I'm making me with the code below & lt; Div class = "entry" & gt; The first image of the post is found in the problem: Imagine that I have 10 posts. Each of them has 1 title 1 content and images. Images in my post are not at all. For example, the title of post 4 will be saved in the "vartitles4" variable, the content will be saved in "varcontents4" and the image will be saved in "varimages4" if the post 4 does not have any image That "varimages4" would have the value that had to be saved on "varimages5". (So ​​the varimages10 value will eventually be empty) So, how can I assign values ​​like varimages4 to a non-image.gif so that the script works properly? The code below gives the picture before I have another two block code, such as this (title-content). $ img = $ xpathimages-> Query ('// div [@ class = ...

In OOP, is operator overloading in fact polymorphism or parameter overloading? -

Is operator overloading really polymorphic or overloading parameters? Is it true that polymorphism is usually responding to different classes, the same "message" (method name) and do different things, so Bird.give_sound () and car.give_sound () can do different things and parameters Overloading is more about talking about the same class, while the different parameters (method names) sent with the message are separate while talking differently. bird.give_sound () and bird.give_sound (: frighten_sound) may be different. Is the operator overloading strictly overloading the parameters? At least in Ruby, sending + "foo" + "bar" "foo" + 3 Foo containing the string message, sending the first line with a parameter string, the second one is sending the parameter 3, and + is slightly different. In the following example, The polymorph is: "foo" + 3 1 + 3 Because + message invites various sections...

Create drop-down list using JavaScript instead of HTML -

I have the following code that creates and removes text boxes using javascript: What I'm aiming to do is to create a set of three drop-down lists using this functionality instead of actually creating a text box. The code for the three drop-downs is shown here: I got stuck in the form of how to achieve this. I had added the "dropdown" to the div and I was wondering if the inside HTML of this div is to be used to use it to create three lists? I have another question, how is it that these are generated by Javascript instead of a HTML and rather than a javascript version. Thanks for any help. Edit I have buttons to make the next line of 3 drop-down but they do not work by default, Father uses javascript to identify drop-down selection Code CNA can be found here: Basic drop downdown Use JS For example why not use JavaScript such as jQuery libraries. This and many other things will be very easy to make, you can like it: $ ('body') Att...

zip directory in iphone -

Is it possible to zip the directory into iPhones? (I am not asking about files) I try with zlib when a directory gets data then it returns 0 [NSDATA datatystem contentoff file: DIR]; Zlib sounds like a good option. You can not pass the directory as a single parameter only, however;

Android 3.0 fragmentation example? -

I'm working on Android apps Now I'm learning about Android 3.0 fragmentation. I'm already using an example of Android block. But it is not working. Please give me another example or please tell the Android block refrain. While it is in Russian, try code understand.

xcode - deploy iphone app on ipod -

I implemented an application for the iPhone, I just wanted to know if I wanted to expose the iPhone app to the iPad device Can I depot through the medium? Is this a good idea or not? Every time my app requires an internet connection, any operation app will respond to requests for web server and web-server. Thank you in advance To install an app in an iOS device , (IPod Touch, iPhone, iPad) you will need to buy a developer certificate from Apple. You will need to become a member, go to join the subscription cost is $ 99 for one year and you can deploy / test your app on 100 devices. After your trial, you can submit your app in the "App Store".

c# - FileVersionInfo.FileVersion returns ProductVersion? -

Image
I try to use file version C #: string file = @ I am doing "C: \ somefile.dll"; Console.WriteLine (FileVersionInfo.GetVersionInfo (file) .FileVersion); For most files this is fine, although for some I have received the results that are different from the results presented in the Windows File Explorer. See the attached image: The file version presented in Windows is "0.0.0.0", however, I am using a FileVision property "000.000.000.000" I have .NET (2, 3.5, 4) that give similar results. Has anyone else experienced this problem? Thanks Lior It seems that the leading parts of Windows Explorer version parts are different. Try creating an assembly with FileVersion 001.001.001.001, it will be shown in Explorer as 1.1.1.1. But your code will return the actual value (001.001.001.001). Edit: The Explorer will return 001.001.001.001 to ProductVersion , but only if AssemblyInformationalVersion is not set In that case, he will return a...

inversion of control - How to use Dependency Injection and not Service Locator -

I'm hearing people saying that you should not use the service locator for your dependency injection. So how do you inject dependency without relying on a service locator? I want to try the IOC containers, but do not want to land in any anti-pattern. Should you just set everything up, so there is a place where there is always the deepest dependency chain in all classes? I do not have the right to be filled with dependence on all the IoC containers of choice, so what is it? So where do you use "your container" (for rexolving)? And how to solve all this, how can you get it, as if your code goes away? Am I missing one thing? I should remind you what I am doing? Just do not want to fall into an anti-pattern and this requires some tips / head. Should you just set everything up, so there is a place where always in all classes Is there a dependency chain in deeper classes? (If I / I understand that) Yes, it is called Root Root of your application, and thi...

Are there PHP browsers? -

Browsers present on Mac without allowing any person to upload and enable a PHP file without enabling it There is no possibility of enabling it)? I was asking about running a server without any reason. I was asking that there is a file browser that allows me to see the output of the file instead of the source code, if anything installed There is no alternative to doing. but you can use a product like without installing USB key To run your code, a CD-ROM or a hard drive. LitePXP is a completely portable application that includes Apache, MySQL and PHP 5.3.LitePXP Also install your PHP applications directly from CD / DVD, USB Stick or Hard Disk without installation You can use LitePXP to put your PHP website on CD / DVD to distribute to customers. Your customers only need to insert CD / DVD then LitePXP automatically starts and CD / DVD shows website pages Of course, you can also use LitePXP to put your PHP website on a USB flash drive or other P & GT. The qua...

regex - Having trouble with Scala's "repsep" as seen in parser combinators -

Please help! I am trying to create a parser to parse SSDP messages as defined. (See "Discovery" section) Actually this is the title of the HTTP, OK, after the name: Add value, and finally a blank line. After 5000 combinations, it's one that I think should most "is" work: * class SsdpParser () JavaTokenParsers { def fulldoc: Parser [ssdpMessage] = header ~ nameValuePairs & LT; ~ "\ R \ n" ^^ {case header ~ value = & gt; SsdpMessage (header, value)} nameValuePairs def: parser [list [(String, String)]] = repsep (nameValuePair, "\ r \ n") nameValuePair def: Parser [(string, string)] = (// name ("" "[-a-gaa-z.-9.] *" "" .rrl; ~ ":") // value ~ "" " [A -ZA-Z0-9: /, _; [] .- \ "\ '\? =] *" "". R) ^^ {case name = value => (name, value)} def title: parser [SsdpType] = (notifyLine | okLine | mSearch) def notifyLine: notify parser [SsdpType] = ...