Posts

Showing posts from July, 2013

android - Increment TextView with button click -

Thanks for the help, but I am still struggling. I did this: Button in XML: & amp; Android: layout_centerHorizontal = "true" android: layout_marginTop = "43dp" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Background = "@ Android: Color / White" Android: onClick = "incrementScore" Android: text = "@ string / player" /> Main code (in the end): Where do I get this code especially when I press the app crash button should keep? context reference; TextView TV; Button incremental; Public zero growth score (bundle saved instenstate) {super.onCreate (SavedInstanceState); SetContentView (R.layout.fragment_home); TV = (TextView) FindViewById (R.id.textView1); Incrementer = (button) findViewById (R.id.button1); Context = this; . Incrementer.setOnClickListener (New View.OnClickListener) {@Override Public Zero onClick (see v) {string present_value_string = tv.getText (...

file - Need help implementing a class into another block of code and running a class java -

OK, so I'm working on this project for which file load is required. My teacher has written this code to load the file. I am trying to figure out how to take this class and use it in the second block of code. I have browsed around the internet but I am still quite confused. And a direct example would be great. I have a second question about how I can run this class. When my teacher runs classes and such other files are run without problems, but when I try to run them despite using the same code, I will not be allowed to run it. Import java.io.FileNotFoundException; Import java.io.file; Import java.util.Scanner; Import java.util.ArrayList; Public class AltFileLoader {Private string path; Public AltFileLoader (string file_path) {path = file_path; } Public Array List & lt; String & gt; loadFile () FileNotFoundException throws {scanner infix = new scanner (new file (path)); ArrayList & LT; String & gt; AllTheLines = new ArrayList & lt; String & gt; (); Wh...

vb.net - For-Next Loop Dilemma -

Net Gurus; I am trying to change the range of "next-next" from within "next"; Is this possible at all; If VB Net is not an option; I'm actually posting my VB.Net code to explain where I am; basically; After performing some equation, I want to change the range of "check" to the value of 100; If the user has an account with & gt; I have some similarities to determine the value of 100 "checks" in text box 1: Public class form 1 private all button 1_Click (sender as object, event as ARG ) Handles Button 1. Click Dim Check = 1 Dim Number = 3 Text Box 1. Check for text = 1 = 1 number for the number 'Lo' some equation if text box 1 Text & gt; 100 then numberflops = 100 message box. Show ("check =" and check) next label 1 text = check end and class If you need to actually change the loop parameters inside the loop then there is no more work for /. You need to use options eg dim number = 3 dim, check = 1 while...

why this mysql query doesnt work from php -

पंजीकरण प्रक्रिया से पीएचपी कोड: $ query = "` उपयोगकर्ता `में शामिल करें 'ईमेल', `पासवर्ड`,` रोल`, `टाइम_ पंजीयन`) मूल्य ('"। Mysqli_real_escape_string ($ con, trim ($ _ सत्र [' reg '] [' 'ईमेल' '))। "', '"। ('SHA512', ट्रिम ($ _ POST ['पासवर्ड'])। "'', '"। Mysqli_real_escape_string ($ con, trim ($ _ सत्र [' रोला '])) "', अब ())"; यदि (! Mysqli_query ($ con, $ query)) {त्रुटि ("....."); } Else { ये सब अच्छा है पहली क्वेरी निष्पादित होती है और डेटा तालिका "उपयोगकर्ताओं" में संग्रहीत होता है लेकिन यहां समस्या आती है। अगली पीएचपी कोड नई आईएसएसएल क्वेरी उत्पन्न करता है, जिसे कभी निष्पादित नहीं किया जाता है। लेकिन जब मैं इसे PHPmyAdmin पर कॉपी करता हूं, तो यह काम करता है ... $ last_id = $ con- & gt; insert_id; $ क्वेरी = ''; विदेशी मुद्रा ($ _ सत्र ['reg'] $ कुंजी के रूप में = & gt; $ मान) {यदि ($ value! = '...

java - How to pass the scanner number to an ArrayList -

My method is working fine !! Instead of putting numbers in the form of my code, I am trying to get information from the user. There is no way I can get numbers without storing them in different variables! Thank you. import java.util. *; Public category interleave {public static zero main (string [] args) {scanner console = new scanner (System.in); System.out.println ("Welcome to the Interlave Program!"); Println (); System.out.print ("How many numbers array 1: ="); Int array1 = console.nextInt (); For (int i = 0; i & lt; array 1; i ++) {System.out.print ("Please enter nubmers: ="); Int num = console.nextInt (); } ArrayList & lt; Integer & gt; A1 = new arreelist & lt; Integer & gt; (); A1.add (10); A1.add (20); A1.add (30); Println (); System.out.print ("How many numbers array 2: ="); Int array2 = console.nextInt (); {System.out.print ("Please enter Enmbank: =") for (int i = 0; i & lt; array2; i ++); int nu...

how to prevent buttons with same class from executing at the same time with jquery -

This can be a simple question once again, but I'm already spending a few hours already, So if you can help, I would greatly appreciate it. I have a script that creates a list of applicants for a certain group. Every applicant has a few brief information about him, his "small business card" has two buttons on the business card; 1 was placed on the shortlist and the candidate rejected the application. The problem is that once you click on a Shortlist button, the jquery code runs on all buttons in the list. This is understandable because they all are the same class (button 15) because the PHP is generated in the variable except it does not add selected, but the candidate for at least shortlist. What would I want to know when how do I stop all the buttons running the code when I click on a button? Here is the code that generates this accident: $ (document) .ready (function () {$ ('15 buttons). Click (function (e) {$ .ajax ({Type: "POST", url: "sh...

javascript - Find all Form Values and Submit -

All the fields in this form are to be searched and submit them to a PHP page which will be included in mysql, but all I go back an empty array, what's missing here? I do not need a .val () & lt; Form id = "form" & gt; & Lt; Table width = "100%" & gt; & Lt; Tbody & gt; & Lt; Tr & gt; & Lt; Th & gt; The display name & lt; / Th & gt; & Lt; Th & gt; Url & lt; / Th & gt; & Lt; Th & gt; Guardian & lt; / Th & gt; & Lt; Th & gt; Ordered order & lt; / Th & gt; & Lt; Th & gt; Active & lt; / Th & gt; & Lt; / TR & gt; & Lt; Tr class = "even" & gt; & Lt; Td width = "200" & gt; Setting & lt; / Td> & Lt; Input type = "hidden" value = "1" id = "setting [0]" & gt; & Lt; Td> & Lt; Input type = "textbox" value = "settings.php" size = "75...

C programing Makefile in linux -

Can not I blame anyone, I'm not sure what's wrong I think I'm doing something wrong Makefile cuz can run it I get error Program: drevoProcesov.c` #include & lt; Sys / types.h & gt; Include `# & lt; Sys / wait.h & gt; # Include & lt; Unistd.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; Stdio.h & gt; 'Zero-less' () {printf ("PID:% d PPID:% d \ n", getpid (), getppid ()); } Ent Main (ET argc, char * argv []) {/ * levo * / if (fork () == 0) {if (fork () == 0) {if (fork () == 0} {izpis (); Exit (0); } And wait (0); izpis ();} exit (0);} and (wait (0); wait (0); wait (0); izpis ();}} / * desno * / Else {wait (0); if (fork () == 0) {if (fork () == 0) {izpis (); exit (0);} and (wait (0); if ( Fork () == 0) {izpis (); exit (0);} and (wait (0); if (fork () == 0) {izpis (); exit (0);} And wait (0); izpis ();}}} exit (0);} and (wait (0); izpis ();}} return 0; TARGET) Clean: RM-RF $ (TARGET) RM-RF * .o This...

sbt native packager - sbt deb package file name format is wrong -

sbt डेबियन: packageBin कमांड मेरे डेब पैकेज को इस प्रकार बनाता है: my-package-1.0.deb नाम और संस्करण को एक अंडरस्कोर "_" जैसे मेरी-पैकेज_1.0 से सीमांकित किया जाना चाहिए। वास्तुकला प्रकार को my-package_1.0_all.deb जैसा जोड़ा जाना चाहिए मैं कैसे प्राप्त कर सकता हूं यह मेरी डीआर फाइल का नाम बदलने के बजाय? आप अपना deb कैसे प्रकाशित कर रहे हैं फाइल? आप अपने वांछित लेआउट से मिलान करने के लिए उपयोग किए जाने वाले "पैटर्न" को हमेशा बदल सकते हैं: val debPublishPattern = "[मॉड्यूल] _ [संशोधन] _all। [Ext]" प्रकाशित करें डेबियन में: = कुछ (Resolver.file ("स्थानीय-डेब-रेपो", फ़ाइल ("/ पथ / प्रति / रेपो")) (पैटर्न (डेबपब्लिशपटार्न))) इसे आपको डेबियन: प्रकाशित करें अपने वांछित स्वरूप के साथ डेब फाइल को पुश करने के लिए, चाहे आप चाहे इसके अलावा, हम इसे वर्तमान में नहीं करते हैं, लेकिन हम आइवी को एक संपत्ति के रूप में "आर्किटेक्चर" को विन्यास में जोड़ सकते हैं ताकि आप पैटर्न को बिल्कुल ठीक कर सकें: [module] _ [revision]...

Android Alert Dialog replace default blue with another color -

Image
I am using a single option warning dialog in which I want to change the default blue color (headline and radio button) I'm using in the title bar that for the orange I could change the title bar using the setCustomTitle () , but I'm trying to get rid of this blue color. For the title bar & Lt; / LinearLayout & gt; Creating alert dialogs AlertDialog Builder Builder = New AlertDialog Builder (main activity.); See custom-cutle = seeinstet (main activity., R.Let.CustomMelt_light_title, empty); Builder.setCustomTitle (customTitle); Builder.setSingleChoiceItems (mAlertOptions, -1, New DialogInterface.OnClickListener) {@Override Public Zero onClick (DialogInterface dialog, integer which) {// stuff dialog.dismiss ()}}}}. () Create show (); This is what it looks like I have to get rid of this blue color! The only way to change the title divider color is resources.getIdentifier Combination, Window.findViewById . You can easily change the ch...

java - Resetting a variable later in the code makes an earlier block of code run slower. Why? -

I have the following program. When I saw something unusual, I was roaming with other belongings. Line "y = 3"; It seems that the last block of code can be run as fast as possible. When the line is commented, the first half of the code runs ten times slower than the second half, however, when the line is inappropriate, then both half run at the same speed. Interestingly, the line in question is anything Do not, because at that point y is already 3. Edit: I added the "y.ystem.out.println (y)" line up "y = 3" and prints it 3. That's why I think it's 3. And I'm measuring the output of the program. Two rows that print, there are two runtime, and the timer code below shows how I measure time. / ** * @author lpreams * / public category miscellaneous {public static zero major (string [] args) {new variety (). Run (); } Run Public Zero () {Timer T = New Timer (); T.start (); Int y = integer MIN_VALUE; For {int j = 0; j and lt; integer.mx_evann;...

sql server 2012 - How to get the difference between two rows in a sql statement -

tblL3SendProductionData से अलग shipperinf_coilid, अधिकतम (PilerInf_CreateDate), अधिकतम (ShipperInf_CreateDate) का चयन करें जहां में नहीं (अलग shipperinf_coilid चयन ShipperInf_CoilId ! table_2 जहां 'ख%') और pilerinf_createdate तरह orderinf_ordernumber से = '1900/01/01 00: 00: 00.000' अधिकतम (pilerInf_CreateDate) इसके बाद के संस्करण क्वेरी द्वारा shipperinf_coilid आदेश से समूह एक प्रक्रिया में कॉइल की सूची और उनकी प्रारंभ तिथि और समाप्ति तिथि। मैं कुंडली की समाप्ति तिथि और अगले तार के प्रारंभिक तिथि के बीच के अंतर को खोजने के लिए एक रास्ता खोजने की कोशिश कर रहा हूं ताकि यह देखना हो सके कि प्रक्रिया में किसी अन्य कुंडल को कितना समय लगाया जाता है। इसलिए उदाहरण के लिए पंक्ति 1 की समाप्ति तिथि 2013-01-01 07: 00: 00.000 और पंक्ति 2 की प्रारंभ तिथि 2013-01-01 07: 01: 00.000 कह सकती है। परिणाम सेट मैं उस विशिष्ट पंक्ति में खोज रहा होगा 1 है। मुझे पता है कि मैं खुद पर तालिका में शामिल होने और पंक्ति को जोड़ने के साथ कुछ करने की आवश्यकता है, लेकिन सिंटैक्स और तार्किक विच...

regex - Python Regular Expression help. Combinations -

I am trying to read from a text file and am preparing a list of seed words that start a sentence And a second list, all the adjacent words except the seed words. The problem is that the words containing an apostrophe are split after the apostrophe and the remaining words are omitted. How will you keep them in the file? Text contained in the file: Is it not a search or all correct approach to work? Or neither? Code: my_string = open ('sample.txt', 'r'). Read () starter = list (set (re.findall) (r "(? & Lt ;; [az] \ s) [az] \ w +", my_string) adjacent = redundant (r? (? Lt;; (? & Lt ;; [az] \ s)) \ W + ", my_string print (my_string) results: ['Doesn', 'look', 'to', 'work', 'sub', 'or', 'search', 'the', 'right', 'approach', 'n'] With two regex it's easy: import re txt = "" \ \ It does not seem to work. Findall or sub...

angularjs - how to have a tab be open by default with angular and bootstrap -

Currently I have two tabs, I can open any by clicking on it, but I want to be opened first Default. & lt; Ul class = "nav nav-tabs" & gt; & Lt; Li ng-class = "{active: activeTab == 'execution'}" & gt; & Lt; One ng-click = "Active tab = 'implementation' '> & gt; Implementation & lt; / a & gt; & lt; / li & gt; & lt; li ng-class =" {active: activeTab ==' video ' } "& Gt; & lt; an ng-click =" ActiveTab = 'video' "& gt; Video & lt; / a & gt; & lt; / li & gt; & lt; / ul & gt; & lt; ; Div ng- show = "activeTab == 'implementation'"> gt; & lt; h4 & gt; test heading & lt; / h4 & gt; & lt; / div & gt; & lt; div ng-show = "ActiveTab == 'video'"> gt; & lt; h4 & gt; test heading & lt; / h4 & gt; & lt; / div & gt; any suggestions ? ...

c# - How to implement nested Models in ASP.NET Web API? -

I can not find a tutorial that shows how to apply a model that manages hierarchical data. Example: How do I model: {"name": "Joe Smith", "age": "40", "address": {"street" : "123pine", "city post-text" itemprop = "text"> person in public category {get public entity ID {ID; Set; } Public string name {get; Set; } Public int Age {Received; Set; } Public int AddressId {get; Set; } Public Address Address {get; Set; }} Public class address {public entry ad {get; Set; } Public String Street {Received; Set; } Public String City {Received; Set; }}

.htaccess - htaccess - 301 redirect -

मैं पुनर्निर्देशित करना चाहता हूं http://www.mysite.com/index Php? Channels = ब्राउज़ करें & channel_id = 1 & amp; sort = rated से http://www.mysite.com/category/cars/? धन्यवाद! Div class = "post-text" itemprop = "text"> यह आपके लिए काम करना चाहिए RewriteCond पर पुनर्लेखन% {THE_REQUEST} ^ (प्राप्त करें | POST) \ / index \ Php \? Channels = ब्राउज़ और amp; channel_id = 1 & amp; सॉर्ट करें = रेट किए गए \ HTTP पुनर्लेखन नियम ^ / श्रेणी / कारों /? R_sortby = उच्चतम & amp; r_orderby = desc? [आर = 301, एल] संपादित करें: पुनर्लेखनकोण% {REQUEST_FILENAME}! -f पुनर्लेखन कन्वर्ट% {REQUEST_FILENAME}! -d रीवर्टकंड% {REQUEST_URI }! / श्रेणी /(.*) रीव्रेटआर्यूल ^ (। *) $ /watch.php?tag=$1 [एल]

Using Grand Central Dispatch on iOS, what queue (if any) do regular Objective-C blocks run on if they are not in a dispatch queue? -

Do the options # 1 run some sort of inherent queue below? It does not seem to run on the main line, because when I tried updating the AI ​​content, I complained, till I did not run in option # 3, I believe the blocks have their own queue or thread is? Before complaining, I was under the assumption that if I did not start a dispatch queue that things would run like normal, which would be in the main line in my mind, for example examples of example: // user view controller. @ Interface user view controller: NSObject @property (nonatomic, strong) server * server; @protecti (non-standard, strong) user * user; @end // UserViewController.m - The controller that sets a block to be used in the other category @UfLuleUserUser controller - (zero) doSomething {// I want to call other methods and set the property @ from the controller and I have heard / / __weak is the right keyword to use (rather than __block or __strong). __weak UserViewController * Vulnerable Controller = Self; // Option ...

c# - Stuck on how to make my scoring system work -

So I'm guessing word games in a Windows Forms program in C #, and there are a requirements that I want Include a scoring system (starts with 100 points, every time a wrong letter is estimated that total 10 points are reduced by 10 points, and if you make correct guesses, then it adds 10 to the total 100 I have.) Everything else works with me. In fact as a way to fix this problem was nothing I could use the help. Have a look at the mind? ` Public Zero Checker (string word) {lblWord.Text =" "; Core liter + = word [0]; Score = score; Update Integer = 0; Update score = score + amount; For (int i = 0; i What exactly is not working about the score? I just wrote some code real quick, and the score was working fine. I see a lot of things in your code that I do not understand, like: score = score; Update Integer = 0; Update score = score + amount; In the beginning, and: update the score = score + amount; LblPoints.Text = (score) .ostring (); Finally, some ...

javascript - Does my Promise implementation agree with specifications? -

I'm trying to create a TypeScript promise implementation (actually a polyfil) which agrees with the current specifications (I I use these). It should be done, the code is here, but I can not understand 2.2.7 subpoints of glasses. Please someone can explain 2.2.7 sub-points and tell me that I have implemented them correctly? Thanks for the attention and time, Matia. Let's talk to the code say that we are called promise 1 . According to the tip: By device Then a promise will be returned Self explanatory: Promise 2 = Promise 1.then (Completed, Calculated); By device If either a completed or calculated value returns x, run the promise resolution process [[Resolution ]] (Promise 2, x). If we have promise 2 = promise 1 Then ((=) => 123, () => 123); Then you can do this Promise 2 Then ((x) => Promise 2 = Promise 1 Then ((=) = {new error ('message');}, () = & gt; {new error ('message');}); Th...

javascript - Change text of all elements with specific data-attribute -

I am currently trying to use jQuery to replace the text of several elements in the value of a specific data-attribute I am For example: index.html ---------- & lt; H1 data-change = "text2" & gt; Text 1 & lt; / H1> & Lt; p Data-Change = "Paragraph 2" & gt; Paragraph 1 & lt; / P & gt; I want to convert 'text1' to 'text2' and 'paragraph 1' as 'paragraph 2' (the value of the data-change of that particular element). How do I do this? I think I will be able to 'select' all the elements with the data-attribute 'data-change' and then just a simple $ (this) .text ($ (this ) .data ('change')); or something else You can do this: $ ('[data] -Change]'). Each (function () {$ (this) .text ($ (this). Data ('change'));}); You can iterate over the elements and change its text.

Iterating generic list using indexes (C#) -

I have switched away from a lot of normal types and array types, but now and again I want to iterate through something This is necessary where it is easy to index like those sequences like they provide arrays. Generic lists are great because they keep the sequence of things internally in the same way as they are in the order of things cast, they are dynamic and come in very useful ways, but can I jump in with the circles like ? Can I say, repeat a general list for the loop, and on some indexes, there is no value in it between the previous or future indexed values, iterate all the values? For example using an array: for (int i = 50; i! = 0; -i) {if (myArray [i] = = 1 & amp; amp; amp;; 5 & lt; = 50) {myArray [i + 5] = Arraye [I + 5] + 2; }} Yes, you can do this with the list like Arrays List Indices Which function similar to the array indicator. Have you tried to do this and it is not working? var lists = exclusive Category (0, 51) .Oolist (); (Var i = 50; i! = ...

Embed PHP into HTML -

I am trying to use PHP to print values ​​for my selected statements, but I work on it Can not get to I have tried to print something with php in my html, but I guess I can not do this. Can anyone tell me what's wrong with it Make sure you do .php not .html. myfile.php: & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Ul & gt; & Lt ;? Php echo "Student register:"; ? & Gt; & Lt; / Ul & gt; & Lt; / Body & gt; & Lt; / Html & gt; You will also need to run this file on that server which is php installed. It will not run directly in the browser like .html file

shell - Git commit -m does not accept spaces in the message -

I'm relatively new to Linux so this is probably an easy one, but when I quote around my GIT (one or two ) Use the message Make the words are taken as the file name with the empty space in the message -how do I use - I do not want to use vi. User @ Linux: ~ / Document / TMP $ git Status Branch Committed on the initial committed change: ("git rm - cached " for new file. . ") New file: Eiffel user @ linux: ~ / documents / tmp $ git commit -m  This message is empty space and failure error: pathspec from any file (files) known to 'message' git Does not match error: pathspec does not match any file (s) known to 'git' Note: Pathspec does not match any file (s) known to 'spaces' git Error: The pathpip 'and' does not match any file (fairs) that git error: pathspec 'failsè' git User does not match any known files (files): Linux / ~~~ Documents / TMP $ GIT commit-m œ nospesisacreacres [Master (Route Commit) 37 AFCD 6] NSSPesy 1 f...

python - Using the csv module -

I am using CSV module to create a file and then I'll write it down. although,. Nothing is written in the CCV file. This is my code: Open CSV ('eggsandham.csv', 'wb') with import as csvfile: spamwriter = csv.writer ( Csvfile, delimiter = spam ',' Lovely spam ',' amazing ',' spam ',' lovely spam ',' wonderful ') spammer. Spam ']) Why is this happening to anyone? This code is working in my case and is writing a CSV file in the current directory. Output or file: Attempting to provide full path may be Spam spam spam spam spam | Baked Beans | Spam | Lovely Spam | | Amazing Spam |

javascript - Increased height of panel in div click -

I want to increase the height of the panel in the div click. & lt; Script language = "javascript" type = "text / javascript" & gt; Function highlights (this) {document.getElementById ('panel1'). Style.height = "200px"; } & Lt; / Script & gt; & Lt; div id = "flip" onclick = "tissue (this)" & gt; & Lt; Div & gt; & Lt; Div & gt; & Lt; ASP: panel id = "panel1" runat = "server" border style = "dotted" height = "50px" width = "125px" scrollbar = "horizontal" & gt; & Lt; / ASP: Cell & gt; & Lt; / Div & gt; This is a server-side control, so you will not get an element with ID = ' Panel 1 '. If you see the source generated HTML of this page then you get the actual ID document.getElementById function You get the document. GetElementById ( '& lt;% = Panel1.ClientID% & gt;'); T...

will google search ranking pick up on facebook posts? -

Will Google search rank add to the link posted on a person (link building)? / P> I do not think so. I tried to get all the indexed web pages of FB, I do not see any specific posts in the list. Other places where you see the post (eg your profile) is loading Asynchronous, so there is no crawling.

android - Nested ExpandableListview with only one child should visible at a time -

I am working on a project that requires two levels of expandable view and only one child has a time Should be open. If there is a child and if I click on the other child, then it should be closed for the last time, it should be at both levels of the expandable ListView. I have enough research but I did not find anything good Any good links and demos will be highly appreciated. Thanks // declared variable private constant int prev = -1; // and OnGroupExpandListener mExpandableList.setOnGroupExpandListener {NewOrGroup Expand Listener} {@Override Group Expand (int groupposition) on public null {if (prev! = - 1) {mExpandableList.collapseGroup (prev);} prev = groupPosition; }});

php - Update hidden field using Autocomplete in Yii2 -

I'm working on an auto-complete widget. So far this is my code. My view: & lt ;? Php $ data = Company :: find () - & gt; Select (['name as value', 'name as name', 'c_id as id']) - & gt; AsArray () - & gt; all (); Copy autocomplete :: widget (['name' = & gt; 'company', 'id' => ddd ',' client option '= & gt; [' source '= & gt; $ data, 'Autofill' = & gt;, 'Minnamp' = & gt; '4', 'Selection' => New JS Express ("Function (Event, UI) {console.log (ui); $ ('# User -company '). Val (ui.item) .id);} ")],]); ? & Gt; & Lt ;? = Html :: ActiveHideInput ($ Model, 'Company')? & Gt; While selecting an option the autocomplete options are updating in my text area but not updating the hidden area. How do I get to update a hidden area, when an option is selected? You can use these properties: Labels - ...

itext - How to move text written in Type 3 Font from one pdf to other pdf? -

Image
I have a PDF that contains text written in Type3 font. I have to get some text from it and write it in the other pdf in the same size. I am using it. Please give me a tip. EDIT: I attached my code. DocumentFont f = renderInfo.getFont (); String str = renderInfo.getText (); X = renderinfo.getbasline (). getStartPoint () get (vector.i1); In this code, I want to write str in the x value position. In Type 3 font, does it work? You can copy the parts of a page and use a new code like this: inputstream processing stream = matching (). GetResourceAsStream ("from.pdf"); PDF Reader Reader = New PDF Reader (new file-output stream ("PDF"); Rectangle page = reader.Tetagaysjewelwetting (1); Document document = new document (pages); PdfWriter Author = PdfWriter.getInstance (Document, New FileOutputStream ("areaOfFrom.pdf")); document.open (); PdfContentByte content = author.getDirectContent (); PDF imported page page = author.imagedpage (reader,...

UML Class Diagram: Attribute or Association? -

Image
अब मेरे पास दो कक्षाएं हैं, नामित रोगी और डॉक्टर हैं: रोगी () {सार्वजनिक : // कार्य यहां निजी: डॉक्टर चिकित्सक; दिनांक तिथिप्रस्तुत; तिथि की तारीख का चयन; } डॉक्टर () {सार्वजनिक: // यहां कार्यरत निजी: // डेटा सदस्य यहां} मेरे यूएमएल क्लास में रोगी वर्ग के लिए आरेख, क्या मुझे चिकित्सक और तिथि को विशेषता के रूप में शामिल करने की आवश्यकता है ? रोगी डॉक्टर: चिकित्सक यदि कोई विशेषता है तो यह समान होना चाहिए: डॉक्टर: डॉक्टर तिथि: दिनांक दिनांक दिनांक डीसीजरित: दिनांक यूएमएल वाक्यविन्यास नियमों के अनुसार, दोनों समाधान मान्य हैं - दोनों वर्ग विशेषताओं और संबद्ध वर्गों को वर्ग गुण कहा जाता है और एसटियंस के माध्यम से लिंक किए गए विशेषताओं (कक्षा के अंदर) या अलग कक्षाओं के रूप में दिखाया जा सकता है। इन दोनों वर्ग विशेषताओं के लिए आप नाम, बहुगुणितता, गुंजाइश, आदि को परिभाषित कर सकते हैं। कृपया विस्तृत तकनीकी जानकारी के लिए यूएमएल स्पेक देखें। हालांकि, यदि निम्न में सामान्य व्यवहार: यदि संपत्ति मूल डेटा प्रकार है (इंट, बूलियन, दिनांक, आदि) - & gt; इसे एक वर्ग क...

serialization - how to store 2dimensional array in shared preferences in android or serialize it -

I'm developing an Android app where I have to save dates (as provided in the array) I am doing this using my shared preferences, my code is working fine, but it behaves differently which I do not know why a. & Gt; When I am saving the array in the shared arrangements, then it is just as I want but B. & Gt; When it comes to receiving the data, it keeps a date, if the date array is twice before. 24 My array is 2 times but for me to show this, a single 24c. & Gt; It also gives me unordered representation of the array. I do not know why this is happening and how to solve it. Someone had asked me to do the serialization but I do not know how to do this? ** string [] [] my_date; My_date = new string [] {{"14", "26"}, {"12", "16", "24", "27"}, {"17"}, {"8", "13 {"15", "18"}, {}, {"2", "3", "6", "", "18"}, {"14...

sql server select statement for 3 tables using join -

Image
Below is a link to my problem, please help me find a solution. How about this query: Top 3 packagesGetTitle, durationindex, package_izde, adult_price Choose STUFF (choose from themes.theme + ',' Get themes on package_theme themeid = packages_theme.theme where package paths for 'package_theme.package = packages.Package_ID (' ')), 1,1,' ') As the subject of the package, rates.package = packages.Package_ID

php - Format text to fit in columns in Excel -

I have this block of text in an array: "Stephen Olsson" Kangswa Žgen "Skolgaton" xxxx-xx-xx 0735xxxxxx, "PAR Davidson" "Skolgaton" "Mantovage" xxxx-xx-xx 0709xxxxxx, I parsed this kind of a CSV -File content, for use in Excel later, however, I want to fit this text with excellence in different columns. So, when I open CSV-file in Excel, I A column should be named, except the address in the column etc. How can I achieve this? Should I use PHPExcel? Or can this be done with plain old PHP? This is my PHP-code $ gatunamn = $ _POST ['gata']; $ Ort = $ _POST ['Omrade']; $ Csv_data = array (); $ newSpider- & gt; ; Fetch page ($ gatunamn, $ ort, offset = 0); $ Obj = json_decode ($ newSpider-> html); echo "& lt; Div id = 'rightcontent' & gt; & Lt; The table id = 'one-column-emphasis' & gt; "; encoded ; the address input type = 'Checkbox' name = 'csv_a...

laravel - L3 Select w/ Eager Loading -

I am using Larial 3 which is loading very slowly What I have seen is this works great! Unless I select a subset of the model's attributes, either -> Use (['Field'] or - & gt; Pignet (, ['Field']) when I do this, it will automatically be used for any Curiosity removes the model, resulting in the relationship being done. Is there any clear way around it? You also need to select the fields in the relationship table: -> Select (Arrays ('table1.column', 'table2.column', ...));

python - How can I call a function defined in another function? -

Today I came to know that I can not find a way to call the function within any other function. Unless I explicitly return it to the main function or use the closure structure. But I am thinking that there is another way to call him. Or it will not be so wired, Python allows me to define functions inside the function, but I do not allow them to use them in a simple way! My code is such, and I def a (): def b (): print 'b' def c (): calling 'print' c For example, call b (), c (), d (). 'Def D (): Print' D 'print' A '& gt; & Gt; & Gt; One () A & gt; & Gt; & Gt; AB Properties: There is no attribute in 'Function' object 'B' & gt; & Gt; & Gt; Eb () attribute: 'object' does not have any attribute 'b' Can not call those functions from outside the scope of the a they are limited to the scope of a You can think of these tasks in the same way As you think about other local ...

java - Getting out of memory exception while creating 2 Dimensional int array -

मेरे पास है: int [] [] लंबाई = शून्य; मुझे रनटाइम पैरामीटर के आधार पर इसे इनिशियलाइज़ करना होगा। मुझे OutOfMemoryException मिल रहा है जब मेरा सरणी आकार कुछ int [ 13000] [130000] या अधिक। क्या इस या किसी अन्य दृष्टिकोण के आसपास आने का कोई तरीका है जिसे मैं ले सकता हूं? नोट: इसे OutOfMemoryError को नहीं रोकना चाहिए, लेकिन आपको JVM स्मृति तर्क, क्योंकि इसे किसी भी मामले में मदद करनी चाहिए। आपको JVM मेमोरी पैरामीटर पर एक नज़र डालना चाहिए असल में आप अपने JVM : -Xmx2048m - & gt; यह परम अधिकतम स्मृति सेट करने के लिए कि जेवीएम आवंटित कर सकता है -Xms1024m - & gt; Init स्मृति जो कि JVM को शुरू अप -XX पर आवंटित करेगा: MaxPermSize = 512M - & gt; यह अधिकतम स्थायी जनरेशन स्मृति के लिए है और आप इस पैरामीटर को भी जांचना चाह सकते हैं। -XX: MaxNewSize = - & gt; यह आपके Xmx मान से 40% हो सकता है -XX: NewSize = 614m - & gt; यह आपके Xmx मान से 40% हो सकता है आप भी आपको JVM बता सकते हैं कि किस प्रकार का जीसी का उपयोग करने के लिए (मुझे लगत...

c# - "Value cannot be null. Parameter name: instance" error when trying to open telerik report -

In my solution I have telleric reports and when trying to open them in a Visual Studio 2010 designer, Error getting: Value can not be empty Name of the parameter: System.ComponentModel.TypeDescriptor.AddAttributes (Object instance, attribute [] attributes) on System column stack. (IComponent Component, String Name, IContainer Container ToAAddTo) on System.ComponentModel.Design.DesignerHost.PerformAdd (IComponent Component, String Name) on System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent (Type Component Type , String name) on system. ComuneModel.Design Secretion.Designalization Manager.Creative Instances (Type Type, Iclon Double, String Name, Boolean Adontaneir) System. ComuneModel.Design Serialization. DesignerSyilization Manager.System Component Modell.Design Sairiylaijheshn Kijijnr Srtialaijheshn Manejrkkret type instance type, Aikaluleshn Arguments, String name, Boolean Adtoantenr) on System.ComponentModel.Design.Serializati...

object - Javascript constructor overriding -

यह फ़ंक्शन का नमूना: फ़ंक्शन उपयोगकर्ता (नाम) {this.options। नाम = नाम; }; User.prototype.options = {name: 'Default'}; Var foo = नया उपयोगकर्ता ('foo'); Var बार = नया उपयोगकर्ता ('बार'); Console.log (foo.options.name); // 'bar' console.log (bar.options.name); // 'बार' सवाल है, कैसे 'फू' और 'बार' प्राप्त करें? धन्यवाद जब आप किसी निर्माता के प्रोटोटाइप में कुछ भी जोड़ते हैं, तो यह सभी उदाहरणों से साझा किया जाएगा। यह कार्यों के लिए सबसे अच्छी बात है, लेकिन डेटा के लिए नहीं हो सकता है। इसलिए, आप विकल्प ऑब्जेक्ट्स को कन्स्ट्रक्टर में स्वयं बनाना चाहते हैं, जैसे कि फ़ंक्शन उपयोगकर्ता (नाम) {this.options = {name: name || "चूक" }; } जब आप ऐसा करते हैं, जब भी कोई उपयोगकर्ता बनाया जाता है, तो प्रत्येक ऑब्जेक्ट को अपना options ऑब्जेक्ट मिल जाएगा इसलिए, एक ऑब्जेक्ट के साथ options को बदलने से किसी भी ऑब्जेक्ट के options को प्रभावित नहीं होगा।

Python SimpleHttpServer Background bug? -

I am experiencing the following problem using a very simple BaseHttpServer (code given below): Start the server uses ./testerver.py and in the background OK and server responses to port 12121 when I reject the server still types in responses After shutting down the terminal, in the server Input / Output Error with the next request with test.log Closes after: Steps of reconstruction: $ ./testersver & amp; $ Bg $ disown Closed terminal, send a request to the server - & gt; Server does not respond. The only solution I found is the stdout and stderr : $ ./testersver> / dev / null 2 ​​& gt; And 1 or @ Daniel has asked to call it in the normal way with nohup before someone has experienced this bug Or is it a desirable behavior for it, if a output is not possible, then to crash a HTTP server? testerver.py #! / Usr / bin / env python import time import bhtipassar hosT_NAME = '0.0.0.0' PORT_NUMBER = 12121 class MyHandler (BaseHTTPReq...

ruby - Jekyll: parametric (partial?) include -

In Jquery, I include a block of HTML code (a Bootstrap is creating multiple tab structure) in my output page Would like to Since the contents of each tab are quite long, I continue to write it in Markdown, with the support of the named link. However, I have different pages with different tabs, so I prefer to pass the capture contents as include as the parameter of the statement example For, I want to like my .md files: --- layout: default title: test keyword: test description: test date : 24 April 2014 --- # test page {% capture content 1%} some content is here ** markdown marka ** want to be able to present myself, capture such _this_ {% endcapture%} {% Materials 2%} Some other stuff I want to be able to as well as the [link] [Google]. [Google]: http://www.google.it/ {% endcapture%} {% contains myparametrictemplate.html section = "content1, content2"%} so far , I have the following myparametrictemplate.html : ## created to confirm that "content1...

c# - Join Tables MySQL -

I have several tables and 2 sub-selections (UserRecord, customercards) which I would like to merge into 1 table UserRecord ======================== | Record id Username ======================== | 1 | Sara | | 1 | Tom | | 2 | Sara | | 2 | Kurt | | 3 | Free | ======================= Table: Consumer guard ====================== ====== | Record id Customer Name | ============================ | 1 | Jeff | | 2 | Alex | | 2 | Peter | ============================== This should be the result: =============== = ======================= | Record id Username Customer Name | ======================================= | 1 | Sara | - | | 1 | Tom | - | | 1 | - | Jeff | | 2 | Sara | - | | 2 | Kurt | - | | 2 | - | Alex | | 2 | - | Peter | | 3 | Free | - | ======================================= I have tried with left, right, left to right, external ... . Include Customer Rickload in Ur Inner as User Record from SELECT *; Rick on ur Id = number Record id; What you want is not included, but...

c# 4.0 - Putting hyperlink in RDLC report asp.net -

Image
I will place the hyperlink "VIEW MORE" in the RDLC column "MESSAGE", clicking on the URL will load the remaining text How should I do this in a page or inline? IMAGE:

Generate derived matrix from index vector in matlab -

Consider those index vectors, of which people are more void: I = [ 0 0 1 0 1 1 0 0]; How can I easily generate the following matrix in matlab: J = [0 2; 1 1; 0 1; 1 2; 0]]; Use: I = [0 0 1 0 1 1 0 0]; D = difference (I); IND = [1 Find (D ~ = 0) +1]; % // every new value rep = diff start index ([index (i) +1]); % / Number of repetitions of each new value J = [I (IND). ' Representative. '];

objective c - socket communication at separate thread -

I've already read about 40 pages threading, but still I'm not sure about my case. An NSObject, which opens a socket connection on a device. This object handles all communications, sending and receiving messages and so on. I would like that this stuff works on different threads. I tried to do something like this: - Connect: (ID) sender {SocketConnectionController * sock = [SocketConnectionController new]; [[SOCK IN WITH WITH PARAMES: IP.Text: Port.Text Etc.) Selector background: @sillector (Initvith Parama: :) with object: Nile]; Send [[SOCKETNECONNECTION CONTROLLER INSTANCE] COMMOD: GEEEIDIDIT]; } As you see, I am sending some messages using the current example of socket condensation controller, but it does not send anything, maybe my There is some leak to understand the side, that the connection is open due to flashing light on the device. Am I making thread on the right track? If so, how can I use it? Update 1: I tried to do something like this: NSOperationQ...

php - My FOR loop wont bring the data from the table -

I am building a room booking system and this piece of code is to fetch data from my table ($ period = 1; $ period & lt; 6: $ period ++) {resonant " $ Period "& Lt; / td>"; $ Rooms = 0; $ Room & lt; Size ($ rooms_are); $ Rooms ++) {$ sql = "select-from where room id =" ". $ Rooms_array [$ room]". '' And period = '' $. Period. '' And date = '"$ sent."' '; // execute SQL query $ result = sqlite_query ($ con, $ sql); if ($ result = 0) {Resonates & lt; Td> & Lt; / Td> ";} {Echo" & lt; Td> Boxcade & lt; post-text "itemprop =" text "> You have a

javascript - Uncaught TypeError: undefined is not a function 'appendTo' -

और मुझे एक त्रुटि मिली अनक्यूट टाइप एरर: '# Img-wrapper-tmpl')। Tmpl ({आइटम: संख्या: आइटमकाउंट}) .appendTo ($ rgGallery); क्या आप कृपया इसकी सहायता कर सकते हैं? बदले में धन्यवाद। आपके पास आपके पृष्ठ में # img-wrapper-tmpl तत्व नहीं है, यही कारण है कि आपका चयनकर्ता निरर्थक या खाली सरणी लौट रहा है और जिस पर आपको यह त्रुटि मिलती है।

arm - Linaro g++ aarch64 compilation cause unalignment fault -

I am using Limarro G ++ for ARM arch64 to compile a simple CPP file: int main () {char * helloMain = "main module (crm.c)"; Long faculty, number = 12; Int stop, main loop = 1; Four words [80] = ""; } generated alpha file after the generated code, I found its asm code: 0000000000001270 : int main () {1270: d101c3ff sub sp, sp, # 0x70 char * Helloman = "main module (crm.c)"; 1274: 90000020 ADRP x0, 5000 & lt; _malloc_trim_r + 0x160 & gt; 1278: 9111 c XX, X, # 0x470, 127C: F90003FLLX, [SP] long faculty, number = 12; 1280: d 2800180 movz x0, # 0xc 1284: f90007e0 str x0, [sp, # 8] int stop, main loop = 1; 1288: 52800020 movz w0, # 0x1 128c: B9003Err w0, [SP, # 16] four words [80] = ""; 1290: 910063e0 X 0, SP, # 0x18 12 9 4: 90000021 ADRP x1, 5000 & lt; _malloc_trim_r + 0x160 & gt; 1298: 91122021X1, X1, # 0x488129C: 39400021 LDR Y1, [x1] 12 A: 3 9 000001 SRB Y1, [x0] 12 A4: 91000400 Add X, X0, 0 0x112A8: A9007C1FSTP XZR, XZ...

javascript - Knockout JS how to bind observable of object html bind -

Let me cssstl one To clarify the obsebable need to see what holds the object set by me, we go with a small part of the code: View Module: Define ('vm.test', ['ko', 'model'], function ko, model) {var myObject = ko.observable (new model.MyModel ()), someFunction = function () {// here some The code that is going to get the object data myObject.property1 = data.test, myObject.property2 = data. test2; myObject.property3 = data.test3;}; Return {myObject: myObject, someFunction: someFunction};}); Model: Define ('model.mymodel', ['ko'], function (to) {var MyModel = function} Var itself = this; self.property1 = ko.observable (); self.property2 = ko.observable (); self.property3 = ko.observable (); self.isNullo = false; auto return;}; MyModel.Nullo = New MyModel (). Property 1 (''). Property 2 (''). Property 3 (''); Mymodel. Nullo.isNullo = true; Return MyModel;}); And what I want to achieve is to force each objec...

javascript - If checkbox selected append his textValue into another span -

I have a dropdown check box for which I get the received checkbox value and append a When the checkbox is & lt; Input type = "text" class = "form-control" & gt; Checked after . When the checkbox is unchecked, I want to delete the add span. This is what I have done: $ ('.chkb: checkbox'). Click (function () (If ($ (". Chkb"), prop ('checked') == true) {var textName = $ ('. Chkb: checked'). Next ('.txt') .text (); $ ("Input-append") .append ('& lt; span class = "input-group-addon vss" & gt;' + textName + ' '); / / Warning (textName);} and {$ (". VSS") .remove ();}}) This is not my script being too great because if I use more checkboxes If you select the option then remove it once for every checked element and only when I uncheck the last checkbox. // dropdown menu (but 'click', function (e) {if ($ (this) .hasClass ('drop-down-s...