Posts

Showing posts from August, 2010

ruby on rails 3 - Why is user.save true but email shows as nil? -

I am using a nested model form for sign-up and working through kinks as a start I am A problem that came up specially, although I do not actually find it returning as user.email back to zero . Before I started playing with the nested model form, I can make a record in the console for a problem. Now, though I can not create records and the latest records are made in their email as zero (I'm not sure there is nothing with the model in it, but this is my reference point When he starts messing up.) If I go to Rail Console to create a new user / profile, I follow this process: user = user. New user.mail = "" user.password = "" user.profile = profile.new user.profile.first_name = "" ... user.profile.save user.save Everything goes fine up to user.save, which gives me an error named : Undefined local variable or # & lt; User: & gt; For the method 'parameter' in the Rail Console, it pins user.rb: create_profile in 25 ...

debugging - How to use break command in idb(intel compiler debugger) for fortran executable file? -

I am new to idb / gdb debugger, so I apologize for the bad questions in advance. I am trying to set a breakpoint in a function called set_time_i which is using idb in the file named time_manager.f90. However, idb gives me an error message and prevents me from setting the HTE breakpoint. Do I know I have done something wrong? I tried all these commands: 1) (idb) break time_manager.F90: set_time_i 2) (idb) break time_manager: set_time_i 3 (Idb) break_set_time_i 4) (idb) break time_manager_: set_time_i _ is an error message "break time_manager: set_time_i ^ Unable to parse the form or the FORTRAN expression. " There is no work above. Do I remember something when I use it? Thanks command, break File: function does not work for FORTRAN (be it GDB or IDB). I usually start the third version of Intel Debugger and my congratulations functions in GDB mode. [shell] $ idbc -gdb a.out # command-line, breaking gdb mode (idb) set_time_i

recursion - Abstracting a loop -

I sometimes feel like writing a loop within my work (recursive work) it creates weird codes like this Is: value = REC loop one = if ... then another loop AB loop a I know I go can move the loop out of the binding, but it is the only objective to calculate tied value. So I thought I could summarize the loop in a different function: let's go f = a rq a = a = match with f a. Some B - & gt; Aux B None - & gt; One aux a I could then: value = one |> Maybe it's better - at least this function is more than definition As an assignment I & lt; These are my questions: Is there a recursive function in Is there any compulsion for any code odor? Is there a better way of refactor If not, can my loop function be normalized, or improved in some way? No I think what you are doing, I got it Is okay Here's how I do it: REC loop guard step init = if guard init then init else loop guard step step init) Assume = a | & Gt; Loop (f...

objective c - How to append the bytes of a bit-field to NSMutableData -

मेरे पास एक स्ट्रक्चर typedef struct {int8_t foo: 1; } बार; मैंने बाइट्स को एक NSMutableData ऑब्जेक्ट के समान जोड़ने की कोशिश की है: NSMutableData * data = [[NSMutableData alloc] init]; बार अस्थायी; Temp.foo = 1; [डेटा संलग्नक: & amp; temp.foo लंबाई: sizeof (int8_t)]; लेकिन मुझे बिट-फील्ड का पता करने का एक त्रुटि प्राप्त हुई। मैं बाइट को कैसे जोड़ सकता हूं? बाइट को इंगित करें, आवश्यक बिट को मुखौटा दें, और चर संलग्न करें एक बाइट के रूप में: टाइपिंगफ़ाइल संरचना {int8_t foo: 1; } बार; NSMutableData * डेटा = [[NSMutableData alloc] init]; बार अस्थायी; Temp.foo = 1; Int8_t * p = (int8_t *) (और अस्थायी + 0); // बाइट को शिफ्ट करें आपको int8_t pureByte = * p & amp; 0x01; // मास्क को आप की ज़रूरत होती है [डेटा एपेंडबिट्स: & amp; शुद्धबैटे लंबाई: आकारफ (int8_t)];

PHP mysql - Creating next and previous link (error with my solution) -

This is the sequel to another question I asked: Let me address this solution next and previous. Now I need to transform it into some useful PHP code. Then there is a Heres solution: Select the CD from the database WHERE (id = (SELECT MAX (id) database from WHERE id & lt; c.id and language = ' N ') or id = (select WHERE id from the MIN (id) database> c.id and language =' n ')) I will put a next and previous link from this How to make What I tried: $ result = mysql_query ("Select ID from database id ASER WHERE (ID = (Select MAX ID) from the database WHERE ID & Lt; c.id and language = 'n') or id = (select WHERE id from the MIN (id) database> c.id and language = 'n')) "); While ($ line = mysql_fetch_array ($ result)) {$ nextlink = "& lt; a href = 'http: //www.domain.com/". $ Line ['c.id']. ".html '& gt; Next & lt; / a & gt;"; Echo $ nextlink; } It does not show ...

Unsigned Bytes in Java -

Bytes in Java are signed by default. I look at other posts, which is a sort of workaround for an unsigned byte: int num = (int) cutting & amp; 0xFF Would anyone explain to me why this works and changes a signed byte to an unsigned byte and its associated integer? ANDing Results in the same byte with a byte 11111111 - correct? A. Typecast has a higher priority than the and operator For the first time, casting an int, and then ending all the high-order bits set up to make a mask, which includes the two-digit "sign bit" of Java usage, in which you can only use the positive value Is left with the original byte example: let's by x = 11111111 = -1 again (int) x = 1111111111111111111111111 1111111 and X & amp; 0xFF = 00000000 00000000 0000000011111111 = 255 And you have effectively removed the signature from the original byte.

Functions vs Scripts - Unix Bash Programming -

I am quite new about programming (one year with java) and about a very new session (about six weeks). I wrote a small application that does some things, and it is entirely the idea of ​​scripts not a function. I know that I can have a file with all the functions but why and / or when. For example, I have a script called getID, which calls the "validateID" script to ensure that the ID is valid 3 numbers pre 827 395 148), then for a specific ID, a " ID "and if the ID is valid and found, then it returns the correct. Then I have another script which is called getID2 which validates the ID and returns the correct ID if it is not found. I've got getopt command recently where i can getID -f say true if to get back and getID -n return to true if not got or i get a function getid write (I can get 0) and if I get, then gives 1. I am currently trying to write applications with better logic. I will accept any advice for any part of the program, but I would really li...

php - GET[] fails to work when one parameter is missing =value? -

The end of my query string looks: tweetpushr.php attachment and id = 20 & Amp; Tweetbody = Wassup% 20David% 20Love% 20you% 20like% 20a% 20brutha & amp; CatID = 6 & amp; Catid2 = 6 & amp; Catid3 = 10 & amp; Dtpub = 0000-00-00% 2000:. 00: 00 & amp; Dtpush = 0000- 00-00% 2000: 00: 00 & amp; Usrpush = & amp; ID = 20 & amp; Tweetbody = Just% 20a% 20little% 20more% 20CSS% 20and% 20some% 20polish% 20man & amp; CatID = 8 & amp; Catid2 = 1 & amp; Catid3 =. 1 & amp; Dtpub = 0000-00-00% 2000: 00: 00 & amp; Dtpush = 0000-00-00% 2000: 00: 00 & amp; Usrpush = I get it to reach the variable but it seems that in the attachment modifier, = > Does not and prevents me from being variable How do I get the value for TTB? there is no reason missing = to attachment Prevents you from not having any other variables Attachment object will be restored with empty string, and the remaining variables will be parsed normally just...

Android Dialog Look and Feel -

had My Samsung Galeksitiab after you apply the latest update to 10.1, I have dialogues created in code "new". I assumed that this was a Samsung skin, and I can not do much about it (honestly, I thought I should not override by default, anyway). Update: Android Version 3.1 Kernel Version 2.6.36.3 se.infra@SEP-63 # 1 Build number HMJ37.UEKME P7510UEKME However, I noticed that still communicate back style in Android Market app (these are thin separator between the blue lines at the top, and buttons). Leads me to two questions: Programmatic, does the option to avoid any skin or changes that were included / is? Eg, default for the original? Or, do I need to set my own style for this? Do you think we should use skin or not? When I know that this is the opinion, then it has been expanded in the form of Android developers, it seems that one of the many fragmentation issues working with us, and I am curious about the expectations of others. I'm making...

seo - Trimming meta description appropriately -

I have a question about the meta description. Meta Description Post Content on Pages other than the Homepage (I'm using Wordpress) My question is, should I trim the content in 150 characters? I normally do this, and I also add "..." to the end. However, I am thinking that forgetting about the limit of 155 variables is more beneficial, so that it can be fully fitted in Google listing. Any opinions? Your description is only one of the sources that Google considers to determine whether the search results in the snippet What goes on. By saying this, this is the most commonly used source, so that it is worth the filling, because it gives you a better chance of controlling. Do not worry about its exact length or if it is different, the main thing is that you have a chance to make a great snippet that encourages people to click on your article. I will install an SEO plugin that lets you override a default description, then do this for your most popular artic...

mysql - Help with executing javascript through ajax via ror -

I am quite new to Rail on Ruby and I need to help with some building and Ajax code execution. Currently there is an invitation function in my webpage which does not work very well. I share the code in a minute, but what it currently describes to me, and what I am trying to do. Therefore, the way the work has been invited is currently: There are 2 buttons to invite people to a page created by a user, a button for those on the site Not yet registered and there are other buttons for registered people on the site. In this current setup, the user needs to know that whether the person who is inviting is a registered user or not (as you can say that this is a big drawback). This code looks like this: This code executes in that AJAX (I'm using HAML along the way, and can post more codes if needed): .invitepeople_buttons = button_to_function 'Add existing user', 'insert_add_existing_member_form ()',: class = & gt; "Submit" = Button_to_function ...

POST url enconding with cURL -

When I send a POST request with a CRL, in the POST field, if they contain strings with spaces, then enter url_encode Will strings or functions do this for me? What's right? CURLOPT_POSTFIELDS = & gt; 'Field = this is% 20is% 20good' or it CURLOPT_POSTFIELDS = & gt; 'Field = this is good' I'm asking because I do not want it to encode the string twice and send false data in this way. Thanks You have not specified this, but I think you Using PHP, is not it? It should be urlencoded according to RFC 1738. You can use the function http_build_query (). I use, for example: $ array = array ('field' = & gt; 'this is good'); Http_build_query ($ array, '', 'and'); You can also easily pass $ arrays in the form of options (such as CURLOPT_POSTFIELDS => $ arrays ), but this is a multipart / form- Will create the data request, rather than the "normal" application / x-www-form-urlencoded. PS...

themes - Problem with my CSS? -

OK, link is free to help me see the source, and my CSS file, anyway for any reason The body is overlaying the header and I do not want this, please help? That's because your header is floating left and not # container Clear : Use both # container in style . Besides, some advice because your HTML looks bad: . Instead of using divs / spans + styles, your & lt; Link & gt; inside the tag & lt; Head & gt; should be the tag. In your case, that particular & lt; Font & gt; tags to & lt; H1 & gt; because it is the title of the site, you can use something like this: & lt; Div id = "container" & gt; & Lt; Div id = "header" & gt; & Lt; H1 & gt; Gaming house & lt; / H1> & Lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; P & gt; Hi & lt; / P & gt; & Lt ;! - luggage - & gt; & Lt; / Div & gt; & Lt; / Div & gt;

python - Are there any good options for baking out a Django site as static files? -

Say you have an existing database-supported Django site. Something like a small model, in which every small league baseball team has a record. The model is seen from a scene which lists all the teams, and the second that accepts a slug and then creates a detailed page about that team What baked app Is there a good option for converting flat files into stacks, so that it can be served from static file service like Amazon's S3? I was toddled together but it is not clear to me how it applies to any existing site supported by a database. Any advice will be highly appreciated Thank you in advance. A new has been declared so far, although it is in existence and it has been used for its Author for quite some time: . I have not tried to use it yet, but it certainly feels good: I will!

python - Endless Syntax Errors for sqlite in terminal -

I am trying to restore sqlite3 and make the database, but I have trouble initially. I go to the terminal and start some things by typing sqlite3 and I get the following signal: sqlite & gt; I am installing SQL Academy and am trying to work through the tutorial, but with the example: & gt; & Gt; & Gt; Import sqlalchemy & gt; & Gt; & Gt; Sqlalchemy .__ version__ 0.7.0 They are typing in the terminal, but my code shows an error: sqlite & gt; Import skelechmy; Error: Near "Import": Syntax Error Is there any cover that I should use in the terminal so that I can type in Python? Do I need to write, compile and run all the examples separately or is this an easy way? I know that it looks obscure, but I think I am doing something very obvious wrong. It is also new to know what it is. That's because you are running in the squirt terminal. The sample code should be run from the python terminal.

visual c++ - const_iterator Prolems -

I have not used const_iterator before and I'm having difficulty debugging it. Any help is appreciated on Windows 7 and VS 2010 Thanks. Type std :: basic_string & lt; Unsigned four & gt; Ustring; Passed data received (data [i], length); Typedef std :: map & lt; String, int & gt; MapMime; MapMime mymap; Mamp ["audio / original"] = 1; Mammap ["Audio / X-F"] = 2; Mammap ["Audio / X-Wave"] = 3; Mammap ["Video / MPEG"] = 4; Mamp ["video / mpeg-2"] = 5; Mamp ["Video / QuickTime"] = 6; (Mapmem :: Constructor for this = mymap.begin (), this end = mymap.end (), this! = End it. ++); {Size_t findPosition = Acquired data Find (this-> first); If found a match in position.position} else {// that MIME type was not found in the data ...}} (findPosition! = String :: npos) You have an additional semicolon after the loop, you should delete it. Otherwise, 'this' is defined only for loop, which is empty. ...

android - Which is better for a .NET developer: Eclipse or MonoDroid? -

I'm learning Android development on Eclipse. As i am a I'm a NET developer, I'm not very comfortable with the Eclipse environment or the Android Library. I have two options here: I can go with Ellipsis or Monodroid for Visual Studio. Which should be better for me? I'm one. I am a net developer. And with monodbed work I did It was very difficult to properly coordinate things, the way of eclipse development ended. Unless they do all the work out of the monodedab debugger, then the path of eclipse goes. If you are going to pay for the license of Mondodepead, then the way to go as a debugging may be that the device is considered better, but for my time and effort and good information It was a ditch effort to test the monodial license to degrade or deploy on the devices. I decided to go with Eclipse. It does not mention that Eclipse works on any platform in the same way as long as you can set it up. It would be nice if they get the monodevelop stuff working with...

ASP.NET how to check if client is Mac -

It seems that there are several ways to do this: I HttpContext.Current.Request.UserAgent The request has been found to use. ServerVariables ("HTTP_USER_AGENT") , Request.Browser.Platform . Not sure which one is the right way to detect the OS version. Also, how do I get a list of the OS version string that the client browser can send to the web server with that string, so I can filter it in code. You can use

Is object created without new operator deleted in a specific case in C++ -

अगर हमारे पास निम्न कोड स्निपेट है: MyObject my_object = MyObject (0); My_object = MyObject (1); MyObject (0) का क्या होता है? क्या इसे हटा दिया गया है? मैंने इसके बारे में क्या पढ़ा है इसे देखते हुए इसे केवल तब ही हटाया जाना चाहिए जब हम निर्माण के दायरे को छोड़ दें, तो संभवतः एनवेडर नहीं। यदि ऐसा है तो क्या यह स्पष्ट रूप से पॉइंटर्स इस्तेमाल करने के अलावा अन्य को हटाने का कोई तरीका है? शब्द हटाएं का सी + + में एक विशेष अर्थ है, इसलिए हटाए गए का उपयोग दुर्भाग्यपूर्ण है। MyObject my_object = MyObject (0); यह रेखा घोषित करता है कि स्वत: भंडारण अवधि (अर्थात, स्टैक पर) के साथ एक प्रकार का ऑब्जेक्ट MyObject बनाया गया है। यह उद्देश्य नष्ट हो जाएगा (यानी, इसका नाशक निष्पादित किया जाएगा) जब दायरे समाप्त होती हैं संबंधित मेमोरी के स्मरण के लिए मानक में कोई प्रावधान नहीं किया गया है (बाद में देखें)। इस ऑब्जेक्ट प्रकार MyObject अभिव्यक्ति का उपयोग कर बनाया जाएगा MyObject ( 0) । यह कन्स्ट्रक्टर अपनी विशेष उपयोग के लिए अलग-अलग सेट की गई स्मृति को इनिशियलाइज़ करेगा। ...

iphone - UINavigationController facing some problems -

I have created a UINavigationController in the UIView controller class where I program - ( Zero) viewDidoadload [[Super Viewedload]; Self.title = @ "Hmmm"; Navigation Controller = [[UINavigationController alloc] init]; // Without this education, tableView appears blocked; navigationController.view.frame = CGRectMake (0, 0, 768, 1004); // & lt; NavigationController.navigationBar.barStyle = UIBarStyleDefault should fill the newly controller screen; NavigationController.title = @ "Hello"; [Navigation Controller Navigationbar Set Handled: No]; [Self.view addSubview: navigationController.view]; CGRect frame = CGRactam (100, 70, 200, 50); UIButton * button = [UIButtonTypeRoundedRect] with UIButton Button; Button.frame = frame; [Button Situation: @ State for "seed": UControlStateAnimal]; [Button addTarget: Self-action: @selector (myButtonClick :) forControlEvents: (UIControlEvents) UIControlEventTouchDown]; [Self.view addSubview: button]; } Now clic...

Why is the db directory not included in JRuby WAR when using Warbler? -

I've created a simple 'hello' type JRuby application Warbler is used for the war and deployed then JBoss is. However, I get the following error when using the application: ActiveRecord :: JDBCError (driver encountered an unknown error: java.sql.SQLException: '/ opt / jboss / Server / Ruby / TMP / deploy / tmp8791905909469840942 Dimo- exp.war / WEB-INF / db / production.sqlite3 ':' /opt/jboss/server/ruby/tmp/deploy/tmp8791905909469840942demo-exp.war/WEB-INF/ Db 'does not exist): When I dig into the demo file then the DB directory is missing from the web-directory. Any thoughts? There are usually only migration DB directory If you are using sqlite3 in the database file but when you have removed it is opened somewhere in the interior spaces of the servers are deployed in the production of a war and potentially Rediol will be away with your database file Rediol. If the file is read-only and you are not worried about the idea that you can easily ...

java - how do can I show matrix values line per line -

मेरे पास एक मैट्रिक्स है: 5x15: के लिए (int i = 0; i & lt; मैट्रिक्स = {{"0", "0", "", "0", "5", "6" , "", "0", "0", "3", "0", "0", "", "", "", "", "", "55", "", "", "", "", ""}, {"1723" , "2", "", "", "", "", ""}, {"10", "0", "", "0", "0", "0" , "0", "0", "20", "0", "0", "0", "", "", "", "", ""}, {"69", "0", " , "0", "15", "20", "" "," "," 100 "," "," "," "," "," "}, {" ...

permutation - Static sized combinations -

Hours and I can not come up with a solution. Let's say I have ABC, I need all its 3 letter combinations, ABC, BBC, CBC etc. Now no ABC etc. Can it be done only with the loop? Any recursion or methods? for (char ch1 = 'a'; ch1 & lt; = 'c' ; C3 and LT; = 'C'; C3 ++) for (four CH 2 = 'A'; C2 and LT; = 'C'; C2 ++)

Does the name of an HTTP status code matter -

I'm sending some HTTP status codes in PHP, do I really need to do header ('HTTP / 1.1301 moved permanently'); or is enough for the header ('http / 1.1 301 fur'); I once did it in a quick and filthy reverse proxy, where I could only get the code, not the message, from the response to curls and it was sent to FooBar Message as it appeared to work fine. Via: The numerical position defined for the HTTP / 1.1 The values ​​of the code, and the reasons for this-example set of phrases are presented below. The reasons listed here are only recommendations - they can be replaced by local counterparts without affecting the protocol.

jquery - Javascript plugin only firing once -

I have created a very basic jQuery plugin, which inevitably holds a phantom image which is a set amount The animation effect to every x millisecond and this plugin is very basic at this level and there are only a few options, and it works very well. In addition to that it has set fire only once! I have several examples of animation on one page and they are all fire, but once only once. Now I am not an expert on JavaScript and only managed to combine it together, but here's the code by any means: // Animation plugin ( Default default option = {SluWidth: 100, frame: 10, speed: 40, minCycles: 1, stopFrame: 0}; // default in function ($) {$ .fn.anime = function (customOptions)} // default Set options for options by using the default option; // set option; Custom options with default Merge existing options with the option set (custom option); // custom option function set option (custom presentation) {options = $ .extend (options, customOptions);} return.Each (function () {/ ...

listview - Android KeyBoard doesn't show in AlertDialog -

I have tried many ways but I can not see any keyboard in my activity. The keyboard just does not show !!! I have a button in my activity, when it calls the way it is clicked, which creates a list below which is an edittext inside and outside a list view (in the header). I would like the user to enter a letter in the text and the array adapter will be filtered and only show relevant results. So everything works well that no keyboard is shown so that you can not enter a text in a lesson. Here's the code: private void buildDialog (final int cual) {// communicate que va mostrar una Lista de customer o articulos AlertDialog.Builder now = new AlertDialog.Builder (this); If (cual == 1) {mAdapter2 = new event adapter (this, clients); } And if (cual == 2) {mAdapter2 = new eventadapter (this, vectors); } Lv2 = new list view (this); Edi = new edit text (this); Edi.setHint ("Aspiris a Asbear"); Edi.addTextChangedListener (filterTextWatcher); Lv2.addHeaderView (EDI); Lv2.setA...

java - Does Tapestry 5 Have composite components -

I'm trying to write a composite component like this & Lt; T: Select t: id = "monthField" t: value = "month" t: blankOption = "always" t: model = "month model" class = "select" /> & Lt; / T: container & gt; so that I can use it like this But I can not use exactly what method to get different elements and create a date element. Any ideas? You type value type date and year and month your: public class MyDatePicker {@Parameter Private Date Price; Public Integer Recipients () {...} Public Zero Set Year (Integer Year) {...} Public Integer GetMonth () {...} Public Zero SatMonth (Completed month) {...}} You can use Java or very well to get / set different parts of your date values.

java - Android : date format in a String -

Due to the format of these dates, there is a problem sorting my date. I receive the date: last calendar c = calendar.Ast Instance (); Mayer = C. Gate (Calendar: IEER); MMonth = c.get (calendar .mONTH); Mday = c.get (Calendar DAY_OF_MONTH); And I create the string with these values. dateRappDB = (new stringbuilder () .append (mYear) .append (".") Append (MMONTH + 1). APPEND ("."). APPEND (MDA). APPEND "")). Toasting (); The problem is that if the month is for February then the MMOUT value is 2. Therefore dates from the months like October (10) dates before my list. What do I need that the day and day are made like MM and DD but I do not know how to do it in my case. Edit : I resolved the problem using a date format I It has changed: dateRappDB = (new stringbilder) .append (mYear) .append (".") .append (mMonth + 1) .append (".") .append (MDay) .append ("")) ToString (); From From: Date Date =...

Regex: Difference betwen negative lookbehind and negation -

से: \ b \ w + (? & Lt;! S) \ b । यह निश्चित रूप से \ b \ w + [^ s] \ b के समान नहीं है जब जोन के पर लागू होता है, तो पूर्व जोन और बाद का जोन ' (एपॉस्ट्रॉफी सहित) से मेल खाएगा। मैं यह पता लगाने के लिए क्यों छोड़ दूँगा (संकेत: \ b एपॉस्ट्रॉफी और एस के बीच मैच) बाद वाला एकल अक्षर जैसे "ए" या "आई" से मेल नहीं खाएगा। क्या आप इसकी व्याख्या कर सकते हैं? इसके अलावा, क्या आप स्पष्ट रूप से स्पष्ट कर सकते हैं \ b करता है, और यह एपॉस्ट्रॉफी और s के बीच क्यों मेल खाता है? \ b एक शून्य-चौथा दावा है जिसका अर्थ है इन पात्रों की स्थिति (उस लिंक से ली गई) को शब्द सीमाएं माना जाता है: स्ट्रिंग में पहले अक्षर के पहले, यदि पहला अक्षर एक शब्द का अक्षर है। स्ट्रिंग में अंतिम वर्ण के बाद, यदि अंतिम वर्ण एक शब्द का चरित्र है। स्ट्रिंग में दो वर्णों के बीच, जहां एक शब्द का वर्ण होता है और दूसरा शब्द वर्ण नहीं है। वर्ड अक्षर निश्चित रूप से \ w हैं। s एक शब्द चरित्र है, लेकिन ' नहीं है उपरोक्त उदाहरण में, ' और s के बीच का क्...

Import WAR to Another Project In Netbeans -

Netbeans has created a web service application and another Web service client in Netbeen, which is necessary for web service customers to access some files. I have tried to add a web service customer to the web service but failed to add to the war. Thanks Thanks Import ER projects and create another project Preparation and preparation of all necessary jars.

iphone - Push-Notification -

I used the link to the server I used PushMeBaby server and my certificate And pushing the app with the provision profile, it reported on the device as a warning and printed the printment on the console written in the method only for the first time when I applied for the first time, but the application for multiple times the application for testing While running it only gives tool token, the following The executed method does not execute all. Please help me solve this problem. - (zero) Application: (UIApplication *) application did the receivermo notification: (NSDictionary *) userInfo {for (ID key in user's information) {NSLog (@ ???? key :% @, Value:% @ one, key, [userInfo objectForKey: key]); UIAlertView * Warning = [[UIAlertView alloc] initWithTitle: @ A ???? Warning message: Key Rep: Automatically cancelTuttonite: @One ???? Okay ???? OtherButtonTitles: zero]; [Alerts show]; / * If (key) {UIAlertView * alert = [[UIAlertView alloc] initWithTitle: @A "alert" ???...

scala - Complexity of List.reverse? -

In Scala, the reverse method for the list is the complexity of this method? Is it better to use this basic list and always remember that what we expect from the list, or explicitly use reverse before working on it. Edit: Am I really interested to get to the last two elements of the original list (or the first two of the inverted list). Then I will do something like this: val myList = origList.reverse val a = myList (0) val b = myList (1) This is not in a loop in my library, only once ... but if someone uses another library and puts it in a loop, then it is not under my control Looking at the source, it is expected to o (n) as you can reasonably: Override def reverse: list [A] = {var result: list [A] = blue These are = this time (! These.ISETT) {Results = this.head :: results = these.tail} result} If you list through your code in reverse order From the repeated order in the preorder, if it is re-enabled at the same cost of repetition, then it will be more...

wpf - Bind dynamic value coming from GUI to the viewmodel -

One of my thoughts is an item contract that allows the user to reorder them by an up / down button. My question is how can I move the current index of items in my Voododal Find out the following questions on how to find the current index (not so clear but it is not clear Now, how can I modify the XAM so that it can tie this view into an asset on its view-modal? Edit The question is how to do this in XAML, a possible solution is that using the code can be observed and changes are made in the archive. Kind regards, Tom So your item should be an index pop Need to update, which you need to update when re-ordering the UI? I will be creating a visual model that defines my item ObservableCollection . You can then handle the collection hangover event, which will set fire to re-order items in your visual model. At this point you can calculate the collection of items updating your index.

PHP: Get thousand from number -

When a user enters more than 1000 numbers, I want to get thousands for that number in an array. For example: The number entered by the user: 165124 should return my array: Array ('thousand_low' => 165000, 'thousand_hag' = 165 99 99) Thank you! Get_thousands ($ num) {return array ('thousand_low' = & quot; Gt; floor ($ num / 1000)) * 1000, 'thousand_hag' = & gt; Terrace ($ num / 1000) * 1000-1); }

crc32 - What is the relation between 32bit CRC and the data word size? -

If we take 32-bit CRC, the data word size will be 2 power 32 (2 ** 32) CRC For more than 32 bits .... or not? Am I missing something? What type of data can I type if I want to write a code in Microsoft Visual C ++ to implement 32-bit CRC? Perhaps I am remembering this and I am nonsense. Actually this is my job to implement the 32-bit CRC and how I completely harm it. Sorry the question is unclear. Any help towards implementation, logic or basic fundamentals would be greatly appreciated. CRC-32 basically / ul>

c++ - Decode funny ISO encoding of e-mail message -

I have an email body (recovered by pole [buffer, POP3], this is apparently the ISO Code uses some markup for the page, such as topic da ?? I ?? T ¤¤¤ schlümmer Test is encoded as =? Iso-8859-1? Q? D = DF_I = DFT_ (Environment: Win32, C ++, I VC2008.) Is called a encoded-word and is defined by. This form =? , where the data appears to be base-64 (b) or something like that is quoted-printable (Q) but not enough (because _ means one place). The C ++ decoder will take you through a byte string. To get the Unicode string, you will then need to use the charset.

ontouchevent - Android stops sending onTouch events -

I have a custom view for which I want to handle touch events. In particular, its content should be scrolled by dragging a finger on the scene. To do this, I have implemented the following Touch Listener: Private on-touch listener graph on-touch listener = new on-touch listener (public) Boolean on-touch (view, Motion Avent Event) {System.out.println (""); System.out.println ("View Width:" + v.getWidth ()); System.out.println ("see the height:" + v.getHeight ()); System.out.println ("View:" + V); Switch (event.getAction () and MotionEvent.ACTION_MASK) {Case MotionEvent.ACTION_DOWN: // First Finger System. Out.printline ("ACTION_DOWN x:" + event.getX () + ", y:" + Event Gety ()); StartTouch (event.getX ()); break; Case MotionEvent.ACTION_UP: // Final finger to displace the system. Print ("ACTION_UP x:" + event.getX () + ", y:" + event.getY ()); break; Case MotionEvent.ACTION_MOVE: // A finger moves Syst...

c# - Reading data returned from stored procedure -

Image
I have a stored procedure that gives the table (or dataset or view or whatever), it's a Select ). I use the Entity Framework and I hope that it will make a unit and treat the stored procedure like a table. When I add Praty to unit schema, it is added, but no class has been generated (nothing appears in Schema or Intelligence). I do not want to use this dataset solution which looks ugly and unaffected: SQL Commands SQL Commands = New SQL Commands ("Spodojs Volksco"); SqlCommand.CommandType = CommandType.StoredProcedure; SqlCommand.Connection = New SqlConnection (Settings.Default.ConnectionStringTransit); SqlDataAdapter sa = New SqlDataAdapter (sqlCommand); Dataset dataset = new dataset (); Sa.fill (dataset); I've found a line that looks pretty clear: var x = context.ExecuteStoreQuery & lt; T & gt; ("Sp_ProjetsVoxco"); But since the structure of the organization did not generate a class, I'm not sure what to do with T . I t...

audio - Http Streaming from ffmpeg, How to get a sequenced packet? -

I'm trying to create http streaming program. That's why I follow this code. However, when I decode, only one frame has been decoded. I think I need to call the function back. Do you know how to call back the function? I know the call back function of 'ASF' packet is such as integer read_data (zero * opaque, four * buf, integer buf_size) but other formats (MP3 , Ogg, AAC, ..) does not work .. Please help me. Any advice or comment is highly appreciated. #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Libavcodec / avcodec.h & gt; # Include & lt; Libavformat / avformat.h & gt; # Include & lt; Libavdevice / avdevice.h & gt; Int main (int argc, char ** argv) {static AVInputFormat * file_iformat; Fixed AVFormatContext * pFormatCtx; AVAFormat parameter parameters; AVCodecContext * pCodecCtx; AVCodec * pCodec; Const four URL [] = "http://listen.radionomy.com/feelingfloyd"; Avcodecre...

c++ - Need to Release a com_ptr_t before reassigning with CreateInstance? -

In a C ++ class with _com_ptr_t members, memory leakage if CreateInstance () is repeatedly used to get a fresh example on the same pointer, The release of COM objects (without performing)? It is well documented that the referee calculation decreases when one of these smart points out of the points, and it is not when the encased pointer is detach () ad. MSDN does not refer to the reed calculation implications, when repeating StructureInstine (). No leak will be _com_ptr_t call release () from CreateInstance () can be in the beginning, which you can easily verify by reading _com_ptr_t implementation.

iphone - multiple UIImageView controlled by multiple UIButtons -

This is my problem I need 3 UIImageViews which is controlled by 3 different UIButtons. I want to control a UIImageView All 3 buttons are required and when done, first go to 1 UIImageView without affecting UIImageView. I am thinking that I have a button that activates 1 UIIMAview and is controlled by 3 buttons, then the second button that activates "YouTubeAvive" and is controlled by the same 3 buttons .... all The first UIImageView without affecting I hope that all this makes sense. Implement this argument You must type the custom sub-class of the UIViewController.

version control - Using Git, if I have 20 changes and I add - commit - push 5 of them. Will the other 15 still be there? -

I want to ensure that my changes are safe when I add "some" Push them into the branch. I am working on different tasks and do not want to add for some people so far. Thank you! Yes, GIT is an excellent system for this workflow due to "staging area" or "index" no -a to git commit , only git add will be upgraded to the next commitment (when If you reduce the number of guitars, then there is a state of the tree index in commitment.) In fact, you can better per granularity per file - I often use only some Changes to a particular file: git add -p whatever.c ... and selecting only the special changes. (If this change gives you, then you are not okay, you can press s to split down. If this is still too high, then you E can be edited properly.) As you are preparing things, it is useful to do this often: Git diff and: git diff - cached Broadly speaking, git diff shows you unposted changes yet While git diff --cached s...

python - Extracting elements inside and between brackets -

I have the following string and what would I like to extract between elements (xx = "yy") and parentheses. Here is an example: [caption id = "get it", align = "and" width = "and" caption = "and this"] also [/ caption] I've tried the following code but I'm quite a noob with regex. re.sub (r '\ [caption id = "(. *)" Align = "(. *)" Width = "(. *)" Caption = "(. *) "\] (. *) \ [\ / Caption \] ',' token:% 1% 2% 3% 4% 5 ', self-sufficiency, again. NICACAS) In advance Thanks a lot! This is probably not working for you because . * Greedy [^ "] * try instead in its place. [^"] Excerpt is a set of all characters except characters, as well You have stated in the comments, the token syntax is \\ n , not % n . Try it: re.sub (r '\ [caption id = "([^" * *] "align =" ([^ "] *)" width = "([^ "] *" Captio...

iphone - text resize none how to apply inline -

I found the right answer (do not adjust the text size on the rotation!) but very CSS How easy to use inline? I used this in the way, but it did not work For example you have a style on HTML tags, not body tags like you I recommend that you try: See more about how this works. Or you can just put this style in your head section: & lt; Head & gt; & Lt; Style type = "text / css" & gt; HTML {-webkit-text-size-adjust: none; / * Stop font scaling in the scenario * /} & lt; / Style & gt; & Lt; / Head & gt; Interesting move, I have never actually done this myself.

c# - Shopping Mall Map Directory Editing -

Image
I have a shopping mall directory image (for example :) and want to apply an application like this where I attract Can be the path between two spaces without the need of many images for the path. So, what techniques (library, programming techniques, software etc.) do you recommend doing this .net (Windows Form / WPF) application? Edit for BOUNTY I'm looking to start something like I am on the third floor of my Near the third floor is the image of the third floor in the map is a point of entrance. There are 29 seats in the floor. I want to show with the line path, where someone has a seat I want to do it through the web app. # MVC 4.5 Where should I start? Any sample code will be very useful. I resolved this problem some time ago. In essence, I was making games like Heroes of Mite and Magic and since I did not want to draw myself in the background, I decided to use a static image, which I would manipulate with only player moves. So we found an open-source game...

iphone - How to display the radius in MKCircle on Map in meters -

I need to use MKCircle on a circle of 1.23 meters of radius on MkMapView. How do I show that on the map I used the following, r = 1.23; // circle in meters = [center coordinates with MK script cycle: position radius: r]; But when I drag it on the map it looks like more than 1 km on the Mkmap scenario. Can anyone tell me how can I represent the radius of 1.23 meters on the map ?? This is primarily to show the accuracy of the location, so the radius shows the accuracy of the location. In viewForOverlay delegate method, try setting lineWidth / Code> to MKCircleView > I think the default width of 0 is in the "width of the road".

Creating a Google Chrome Extension wildcard in manifest.json -

I am trying to create a Chrome extension that should be touched every 10 minutes. Here is my manifest.json file: "" "" "" "" "" "version": "0.1", "description": "Facebook every 10 minutes again Load. "," Content_scripts ": [[" *: //touch.facebook.com/* "]," js ": [" myscript.js "]," run_at ":" document_start "}]," permissions ": ["Http://touch.facebook.com/*", "https://touch.facebook.com/*", "tab"]} I really only wanted Instead of "*: //touch.facebook.com/*" instead of "*: //touch.facebook.com/#! /home.php* "To refresh" Although I can not understand a way to create wildcards, work this way either "#!" Is there a problem with or with a security problem that allows the wildcard in chrome path Any thoughts? Thanks, b. The problem is that they are not t...

windbg - How to get handle to an event that may cause my application to go in hang state -

I am analyzing a dump file for an application, an interesting line from the stack trace. 0bc2f3e4 75a8bd1e 0bc2f298 0bc2f30c 00000001 ntdll! Kifst SystemClercet 0bc2f32a 6a393c42 00000001 7ffdf000 00000001 Kernel 32! WaitingFormmultibleObjectX + 0x8e Looking at the details in MSDN, the second parameter is CONFUSH Handle * LPHDLL This is something I should be able to do! To handle 7ffdf000 to find out what events it is waiting for, but when I do this, I type type error type of the following Any ideas about what I am doing wrong or any tips about getting more details on the causes of Hog? The second parameter is an indicator for the array of handles. In your case, because the size of the array is 1, you should be able to handle using the command ! Poi 7ffdf000

exception handling - Why am I getting "Index was outside the bounds of the array" when running mstest.exe on the commandline? -

I'm running it on your machine "% ProgramFiles (x86)% \ Microsoft visual Studio 10.0 \ Common 7 \ IDE \ mstest.exe "/testcontainer:"C:\orking?Einstein?Solutions?EnsteinAcceptanceTests\bin?Debug?EnsteinAcceptanceTests.dll" /resultsfile:TestResult.trx " and I get index was outside the bounds of the array Send to. Any clues on how could you get this error? When you try to run VS2008 test you receive this error? VS2010 with mstest.exe.

Use graph.facebook.com to get URL's and Names of Photos -

I have to get the URL and name of the pictures contained in a Facebook photo album. I know that this is possible through graph.facebook.com, but I do not know where the identity of an album is from. As an example you can use this album: Which of the following numbers is an album id? And how do I get a photo url with name? Thanks in advance. Just get the connection for your example: Then the first album (or Use to get pictures of another album, just change the ID based on the album you got from). I suggest you and I am trying for examples. And read more documents.

synchronize variable actionscript -

सार्वजनिक var: नो ओफ़ एलेमेंट्स = 0; सार्वजनिक फ़ंक्शन addElement () {// हर कॉल में एक के द्वारा नोफ़ इलिमेंट्स बढ़ता है} सार्वजनिक फ़ंक्शन remvoveElement () {// प्रत्येक कॉल में एक के द्वारा NoOfElements घट जाती है} addElement और निकालें एलेमेंट को दो अलग टाइमर इवेंट्स और प्रत्येक विधि में यह वैश्विक चर नो ओफ़एलेमेंट्स को संशोधित करता है। क्या एन्डिश्री में चर को सिंक्रनाइज़ करने का एक तरीका है? फ्लैश "थ्रेड सुरक्षित" है क्योंकि यह वास्तव में चलता है केवल एक धागा है, इसलिए आपको कुछ भी सिंक्रनाइज़ करने के बारे में चिंता करने की आवश्यकता नहीं है। टाइमर आपके फ़ंक्शन को चलाएगा और आप यह सुनिश्चित कर सकते हैं कि इसे दो बार एक साथ नहीं चलाया जाएगा। तो, अपने प्रश्न का उत्तर देने के लिए - कोई भी "चर को सिंक्रनाइज़ करने" का कोई तरीका नहीं है क्योंकि एक के लिए कोई आवश्यकता नहीं है

Silverlight Wcf method receives the exception even after the WCF service executed successfully -

About my application: The application is built in silver light. It uploads the file to the server and reads all the records from the file and confirms it and inserts it into the database table. The following problem occurs when I run an application in IIS and upload a large file containing 50,000 records. When I host an application in IIS and browse the application with machine name, WCF service also gives error after the service is executed successfully. By putting all the data in the database table, the WCF service Successfully gives returns, but when it comes to silver illumination, it shows an exception. But when I "hostel" the application is hosted using IIS 5 and set Windows authentication. increase WCF binding timeout (sendTimeout)

c# - Large entity framework split into many EDMX. How to operate between those? -

I am working on a large database, it will contain a total of 200-300 tables. First of all, does anyone have such database in an EDMX? In the designer of my experience, when you get 50 or more institutions, it becomes useless. In my case, the database itself divides itself, such as in the subject areas like Membership, Systems, Assets etc. > This is the same with ADMX and everything works more or less well. There is every problem that I can bet .. I have all the main institutions, and the user table lives in different EDMX. I can deal with this fine for the operation of the CUD because I have hanged around the current user but for retirement, I often need to display that ID which was created and for this I must be involved together. But I can not be included in the table in different EDMX. I get 2 solutions on this: I can not list the users' list (it can not be too large) and I know what I am doing - # 1 is probably okay but I can see how I can be in the fut...

file - What's Wrong with this Java Code? -

This does not give me any errors, but when I recieve it (I used to declare all the variables / arrays): line 48: for (int i = 0; i Exception thread "Main" modmaker.GuiBlocks2.main (guiBlocks2.java:48) on java.lang.NullPointerException package modmaker; Import java.awt.EventQueue; Public category GuiBlocks2 extends JFrame {/ ** * * / Private static last long serial VERSIONUID = 1 L; Public JFileChooser filePath; FileEditor File Joiner = New FileEditor (); / ** * Launch Application * / Static String Files; Fixed string filelist = ""; Stable string path = "modemaker"; Fixed file folder = new file (path); Fixed file [] listOfFiles = folder.listFiles (); String [] allFile = fileList.split (":"); Public Static Zero Main (String [] Elggs) {EventQueue.invokeLater (New Runnabal) (Public went from zero) {try {GuiBlocks2 frame = New GuiBlocks2 (); Frame.Set still (true);} hold (exception e) {E.printStackTrace ();}}}); // for the directory pat...

php - Importing XML-RPC data to SQL table -

I want to be honest, so, from the beginning, I will tell you that I am not very good with this stuff. I am new to PHAP / SQL etc., and I am related to this problem at the moment, so any help would be appreciated. My problem is next: On a website, I have access to using the API but, The problem is that its XML-RPC has read all the guides and tried to googling for some sort of solution, but I had no luck with it. I want to import xml-rpc data directly into the existing SQL table. This is the method I want to use to call data: Name: "money Returns: Array (array, amount, timestamp)) .Received: Array ("API key", "Player name", "Minimal timestamp (0 is fine for complete history) Hr> And this is the code I have: the money was received & lt; br>; # Var_dump ($ response2); Echo "& lt; BR & gt;"; Echo "& lt; table range = '1' & gt;"; Echo displayTree ($ response2); Echo "...

postgresql - ECPG invocation of stored procedure with an array argument -

I have an ECPG customer trying to get data, with a subcategory using this stored function "nullipid" Uses a prepared statement that has 4 arguments. I have done this work with the 4th argument, which has been declared as a simple varchar. I have tried to declare the fourth argument as an array, but the ECPG is not passing the first argument of the array only in 4th ARG, not all of them. What is the trick to cross the full fear of the Recoverser (S)? This array size will usually be limited to only 5 disputes. I realize that I can add more logic to the function to overcome this issue. I was hoping that the solution would be more elegant. Thank you for your comments Dave The initial part of the EXEC SQL; Const char * cid = connid; Const char * tgrp; // group key (trunk) const char * cca; // Call Control Agent Key (Truck) Conquest char * dhost; // Host key (trk) const four * regusr [MAX_USRS]; // Register Username (Linux) Excel SQL and Disclaimer Section; The PGC ...

c# - How I access ClientCredentials from with a custom IChannel or IChannelFactory? -

To implement the custom security protocol, I am creating a custom channel in WCF, do not run! It's not scary! The protocol on the service is relatively easy to investigate. Adding security information to request based on hard working client credentials. What I have to do is ClientCredentials object ( clientprocess from within my channel implementation) is generally in use, Code> Service EndPoint example can access this through the property: var credentials = channel.Endpoint Behaviors.Find & LT; ClientCredentials & gt; (); However, I can not find a way to reach the service endpoint, which is linked to within the channel - almost zero metadata ChannelBase class . Is there a way to get my channel interval? What is an alternative way to access client credentials on client side? Standard security channel 't access to client credentials internally they Instead of SecurityTokenManager , which is made up of client credentials . I recommend us...