Posts

Showing posts from May, 2010

PHP: How to make the user stay on the same page if the required fields in the form aren't filled? -

If the form is not filled in the required fields, how can I create the user on the same page? Any answers would be greatly appreciated. & lt ;? Php header ('location: SOING.html'); $ Name = $ _POST ['name']; $ Nickname = $ _POST ['last_name']; $ Cons = $ _POST ['cons']; $ Password = $ _POST ['pass']; $ Email = $ _POST ['email']; $ Message = $ _POST ['message']; $ Recipient = "pixiedustmed@yahoo.com"; $ '=' Pixiedustmed@yahoo.com '; $ Theme = "contact message: $ name $ surname - $ email"; $ Headers = "to: $ name $ surname \ r \ n"; $ Headers = "Reply:" Strip_tag ($ _ POST ['email']) "\ r \ n"; $ Headers = "Cc: avedis@avedis.ga \ r \ n"; $ Headers = "MIME-Version: 1.0 \ r \ n"; $ Headers = "Content-type: text / html; charset = ISO-885 9-1 \ r \ n"; $ Message = '& lt; Html & gt; & Lt; Body & gt; '; $

c++ - Difference between char argv[][7] and char *argv[] -

इस सवाल का पहले से ही एक उत्तर है: < / P> 10 उत्तर 4 जवाब मैंने हाल ही में सी भाषा सीख ली है मैंने पढ़ा है कि स्ट्रिंग की एक सरणी बनाने के कुछ तरीके हैं। क्या char argv [] [7] और चार * argv [] के बीच कोई अंतर है? अगर नहीं है तो आप क्या उपयोग करना पसंद करते हैं? C99 मानक §6.2.5 ¶ से उद्धरण 20 (प्रकार) एक सरणी प्रकार किसी विशेष सदस्य ऑब्जेक्ट प्रकार के साथ ऑब्जेक्ट्स के कॉन्सीग्यूएरियल आवंटित गैर-निष्पक्ष सेट का वर्णन करता है, जिसे तत्व प्रकार कहा जाता है। सरणी प्रकार उनके तत्व प्रकार और सरणी में तत्वों की संख्या के आधार पर होता है। मानक आगे §6.2.5 ¶22 में कहते हैं अज्ञात आकार का एक सरणी प्रकार एक अपूर्ण प्रकार है। यह एक बाद में घोषणा (आंतरिक या बाह्य संबंध के साथ) में निर्दिष्ट करके, उस प्रकार की पहचानकर्ता के लिए पूरा हो गया है। सरणी सबस्क्रिप्ट ऑपरेटर [] * ऑपरेटर से अधिक प्राथमिकता है इसलिए, कथन चार * argv []; परिभाषित करता है argv सरणी आकार निर्दिष्ट नहीं है क्योंकि अज्ञात आकार के वर्णों के लिए सूचक की एक सरणी हो। सरणी argv एक

adobe - sharing an editable edge animate file -

I am trying to email an edge animation project, but the only way to understand it is to publish it. And then with the Edo muse file. And then there is no way to edit Edge animated file. What should I do to be able to send an editable edge animation project? Thank you. * Send an .an file, or create a template that will give you a *. antmpl file To open a * .antmpl, select from template, import,

python - SQLAlchemy before_update called instead after_delete -

Can someone tell me what I am doing? I have a way with which Register event (before_update, after_delete, before_insert) @classmethod DEF register_tree (CLS): event.listen (cls, "before_insert", cls.mptt_before_insert event.listen (cls, "after_delete", cls.mptt_after_delete) event.listen (cls, "before_update", cls.mptt_before_update) When I registered the event and the row () Attempt to delete class tree (base, baseNestedSets): __tablename__ = "tree" id = column (integer, primary_key = true) tree.register_tree () def test_delete_node (Self): node = self.session.query (tree) .filter (Tree.id == 4) .one () self.session.delete (node) # id lft rgt lvl parent tree self.assertEqual ([( 1, 1, 16, 1, none, 1), (2, 2, 5, 2, 1, 1), (3, 3, 4, 3, 2, 1), (7, 6, 15, 2 , 1, 1), (8, 7, 10, 3, 7, 1), (9, 8, 9, 4, 8, 1), (10, 11, 14, 3, 7, 1) 12, 13, 4, 10, 1)], self. Retail.All ()) The first _dated method is called instead after_delete. But if I

java - How to detect running JDK -

Return to the OpenJDK and Oracle JDK Java version both on Linux OS How can I find out if running Java is openJDK or Oracle JDK? Code: System.out.println ("java.vendor:" + System.getProperty ("java.vendor")); System.out.println ("java.version:" + System.getProperty ("java.version")); System.out.println ("java.vendor.url:" + System.getProperty ("java.vendor.url")); Output: Java. Seller: Oracle Corporation Java Version: 1.7.0_55 java.vendor.url: http://java.oracle com / There is a Java-version command for two JDKs: Java version "1.7.0_55" OpenJDK Runtime Environment (RHL-2.4.7.1.L 6_5 -X86_64 u55-b13) OpenZK's 64-bit server VM (24.51-B3, composite mode creation) Java version "1.7.0_51 "Java (TM) SE Runtime Environment (Build 1.7.0_51-B13) Java Hotspot (TM) Server VM (Build 24.51-B3, Mixed Mode) Try: println (System.getPrope rty ("java.vm.name"));

php - Connect to two databases on the same host at the same time -

How can I connect to two databases at the same time if both databases are on the same host and I have both privilege Are the databases So I have DB-1 and DB-2 and in this case I want to work with the following database with two databases. I am currently using the requirement ("db.fp"); To connect to a database, but I would like to connect to both the databases. is required ("DB-1.php"); $ Tbl_name = "System_Info"; Mysql_connect ("$ host", "$ username", "$ password") or die ("can not connect"); Mysql_select_db ("$ db_name") or die ("can not choose db"); $ sql = "SELECT COUNT (a.student_id) from DB-1. TableA is an INNER DB-2.TableB b at a.student_id = b.student_id where a.account_status = 'Avtive' and aemesteer = '6' and b. assesor_status = 'pending' '; $ q = mysql_query ($ sql) or die ("query failed:". mysql_error ()); while ($ line = mysql_fetch_ar

python 2.7 - Python27 Memory Error Issues -

I'm trying to process some data that uses Python, but often with "memory error" Does matter. For my data processing, I need to run the loop ~ 400 times. The issue is, every time I get 20-30 times in this loop, I get "Memory Array", looking at the task manager, it appears When python.exe is 32 ~ 1gb I will use 64-bit python but the libraries I need are only 32 bits. In addition, at the end of the main function, I am calling with every loop, I use To do I am using the Dell function for every variable of the I, when "memory er" occurs then I have to get out of the interpreter completely, otherwise if I try to run it again again Automatically fails with "memory arrays" I need Python (X, Y) 2.7 and below: numpy scipy.io matplotlib pyopencl pyfft You have said that it has crashed like a line A = 2400, with B = 256, C = 25: s = zeros (A , B, C), complex128) This will require 235 MB of memory and not only 235 MB: It should be narrow

mysql - Update table with data from secondary table by foreignkey -

मेरे पास दो टेबल हैं: tableA और tableB । मैं tableB को निकालना चाहता हूं, इसलिए यह बेमानी है, इसलिए मुझे कॉलम मूल्यों को tableB से tableA कॉपी करना होगा। टेबल ए: | आईडी | नाम | टेबलए_आईडी | तालिका B | आईडी | टेबल सी_आईडी | टेबल डी_आईडी | tableA बदल दिया गया है, इसलिए इसमें अतिरिक्त कॉलम हैं tableA : | आईडी | नाम | टेबलए_आईडी | टेबल सी_आईडी | टेबल डी_आईडी | तो मूल रूप से मैं कॉलम tableB.tableC_id और tableB.tableD_id में tableA.tableC_id और tableA.tableD_id । कैसे मैं एक एसक्यूएल अद्यतन में इसे बंद खींच सकते हैं? आप अपडेट के साथ अपडेट करते हैं ; -) सारणी सारणी में एक टेबल पर शामिल होने के लिए TableB.id = tableB.id सेट तालिका A.tableC_id = tableB.tableC_id, tableA.tableD_id = tableB.tableD_id;

java - Creating ArrayList from class -

I am creating simple card games, the player has 3 cards. I have this cardpart class and I I want to create an array list public list & lt; CardParts & gt; Parts = new ArrayList & lt; CardParts & gt; (); Parts.add (new cardpresets ()); // & lt; == Error is here, I do not know how to create this array my cardpeak class: public class cardparts {public cardparts (String [] picz) {}} I need to use the array, so I can easily use it for loop and enter random number for each increment. For example: parts [i] = randomnumber; If you are confused, then just for the plan, I need 3 cards, 11 cards in every card (array) card1 = (1, 2,3 , 4,5,6,7,8,9,0, A) , so on other cards & lt; - As such .. Please help me solve it if you can, then this array is from the list .. However, if it is stuck, then I am ready to use another method. thanks When you define a rational constructor Trying to use the default No-Arif constructor of the object if you define a co

android - Understanding fragments backstack -

Therefore, there are some similar questions, but I have not found any single person to solve this issue. Looks intuitive, but when I apply an application with a more complex workflow, pieces of backstacks become confusing and weird stuff starts up. I developed a skeleton for the simple app, which included the ideas of the same activity which can be used by its pieces to start the other pieces. How do I do this: 1- I let my main activity apply to an interface called "FragmentDelegate" public interface fragmentedgeget {public zero startup restriction (CC framework) Slice, boolean addToBackStack); 2-Implementation of the process of process: @ Override Public Zero Start Restrictions (CC Fragment Piece, Boolean Adtoback Stacks) {Fragment Manager Slice Manager = getSupportFragmentManager ( ); Fragment.setFragmentDelegate (this); Piece Transaction Piece Transaction = Piece Manager. Section transaction Set custom animation (R.anim.slide_in_right, R.anim.slide_out_left, R.

javascript - $interval's invokeApply parameter does not change anything -

$ अंतराल सेवा के कोणीय से: invokeApply (वैकल्पिक) बूलियन: यदि सेट हो गलत स्लिप्स मॉडल को गंदे जांच छोड़ने के लिए, अन्यथा एफएएल को $ ब्लॉक पर लागू कर देगा। कौन हमें निष्कर्ष पर पहुंचा सकता है कि $ रूट स्कोप। $ लागू होगा अगर मैं < कोड> आमंत्रण लागू करें झूठी के रूप में हालांकि, $ अंतराल के स्रोत से मुझे पता चला है कि deferred.notify को प्रत्येक टिक कहते हैं, जो समझ में आता है। क्या नहीं, तथ्य यह है कि आस्थगित। नोटिफ़ाइज़ निष्पादन $ rootScope। $ EvalAsync के दौरान कहा जाता है, जो क्रम में $ rootScope। $ Digest । तो सभी गंदी जांच अभी भी होती है। क्या मुझे यहाँ कुछ याद आ रही है? बग पहले ही दायर हो गया! आप कुछ भी नहीं भूल रहे हैं

php - Checking if post is within 24 hours -

I am working on a WordPress site. There is an additional date field in my posts, and I only post that I am trying to demonstrate if the area of ​​that date is within the next 24 hours. I have a WordPress query that is about to grab only the most recent posts, and I only want to show this division if the date of the post is within next 24 hours I found: & lt ;? Php $ webnars = get_posts ('post_type = webinar and posts_per_page = 1'); Forex Currency ($ webnar $ as post): setup_postdata ($ post); $ WebDate = Stromatom (get_field ("next_live")); ? & Gt; & Lt; div class = "footer_alert" & gt; & Lt; div class = "wrapper_inner" & gt; & Lt; div class = "footer_alert_inside" & gt; & Lt; A href = "& lt ;? php the_permalink ();? & Gt; & Gt; Upcoming Live Webinar - & lt ;? Php counter date ('mj, y', stroke (get_field ('next_live')); ? & Gt; & Lt; / A & gt; &am

php - Show 3 top results according to date using sql -

I have a website, and I have created a library in it. The table is: book contains: book_id , book_title , book_cat , book_img , book_content , active , book_date , visits , book_sender ) 'book_seender' is the identifier of the sender because any logged user can add books, I send the best sender (which sent a lot of books every week ), So I wanted to show the top 3 head To make a challenge between 3, sender of the week in a PHP file champion ---------- book_ id book_chitle book_cat book_img book_content active book_date code spetate (replace the appropriate value of db_name, db_user, and db_password): < < pre> & lt ;? Php $ db = new PDF ('mysql: host = localhost; d bname = db_name; charset = UTF8', 'db_user', 'db_password'); $ Db- & gt; Set attribute (PDO :: ATTRRAMOD, PDO :: ERRMODE_EXCEPTION); $ Db- & gt; Set attribute (PDO :: ATTR_EMULATE_PREPARES, incorrect); $ Stm = $ db- & gt; Prepare (select &quo

upload - Laravel uploading a file to the right directory -

I upload the file correctly only It is known that, in my case, the initial directory is public, and as a result Files are acceptable by everyone, when they should be in directories that are preserved by previous authentication, i.e. under the app. So, when I do this: $ file = input :: file ('fichero'); $ DestinationPath = 'Upload / Folder'; $ File & gt; This step ($ destinationPath); // model model $ model = make new model; $ Model- & gt; File name = $ file-> GetClientOriginalName (); $ Model- & gt; Destination path = $ destination_path; The file is saved in: Local ... / MyWeb / Public / and that app is outside the original folder where all my application files are < / p> I can think that the fact of going to that directory is because it is taking the defaults in the configuration file, which is localhost / laurel / public / index.fp/ / p> $ file-> Write something like move (base_path (.) '/ Uploadfolder / subdirectory /

javascript - Style console.log output and run functions -

Image
After doing a little bit of scandal around the source code for , I saw how to console users to communicate with them (Only works in Chrome). In addition, if I If I enter joinUs () on the console log, then a function is run that directs me to a new page. I tried to run my function in the console logs by declaring the function of your website: function testFunc () {console.log ('Hello World!'); } But if I try to enter testFunc () on the console log, I get the following error: < code> ReferenceError: testFunc is not defined Is there any information about styling the output of console logs and how to run a function from the console? For the style, you can check - if you read through the code then I'm sure you can. Understand how it works. Available to be available testfunc , specify it clearly on window , do window.testFunc = function () {console.log ('Hello World!')}; . it should work.

Javascript .charAt(0) gives unexpected results -

var वर्ग = "ए ()"; अगर (category.charAt (0) == / ^ [a-zA-Z] + $ /) {/ * यह भाग निष्पादित नहीं होता है / / * if condition के साथ समस्या है? * /} < / code> आप एक नियमित अभिव्यक्ति के उदाहरण के साथ अपने चरित्र की तुलना कर रहे हैं आप वास्तव में नियमित अभिव्यक्ति के साथ अपने चरित्र का परीक्षण करना चाहते हैं। आप ऐसा कर सकते हैं: var category = "a ()"; अगर (/^[a-zA-Z]+$/.test(category.charAt(0))) {// अब इसे निष्पादित किया जाएगा} जावास्क्रिप्ट regex पर अधिक पढ़ने स्वाद:

wordpress - how to load custom single.php? -

Hello I have a blog where class news, events and inspiration are there. These categories are selected using the radio buttons on ACF. I want to load news on the news alone. PPP while single-event. Program on FPP and motivation alone. Inspiration on PPP Doing this Is it possible to use ACF field? To load custom code I have come to this code with the default categories of WordPress $ post = $ wp_query- & gt; Post; If (in_category ('1')) {included (templat. '/ Single 1.php'); } Otherwise (in_category ('2')) {Include (templatepot '/ single2.php'); } Other {Include (temp. '/ Single_default.php'); } What can be used? While using ACF? Thanks guys. You can do acf_category to handle your ACF field .. < / p> $ post = $ wp_query- & gt; Post; $ post_cat = get_field ('acf_category', $ post-> ID); Switch ($ post_cat) {Case "News": Include (templatepart. '/ Single-news.fp'); break; Case "even

html - Responsively sizing a sprite -

What I'm using: Bootstrap 3.1.1, jQuery 1.11 What do I try to do I am doing this: Use a phantom for different class icons, and keep it through CSS. On the XS device (phone) I want to put 3 of these on each row, because I am on the small medium; Large device However, the size of each icon is 200x200. And I'm not sure how this type of perspective image should be shaped responsibly. If I change the #category-icons - the width of the Hands-Tools and the amp; Height, it shows only a small section of the phantom instead of changing the shape of the phantom. Phantom can be found here: Any thoughts, people? Should I use 2 different sprites, and should use CSS for the tablet to use a different sprite below media queries & amp; phone? I'm not sure at all. Looking for the easiest solution, which works perfectly. JS Fiddle at: & lt; div class = "colonel-LG-4 colonel-MD-4 call-SM-4 pen-xs-4" & gt; & Lt; a href = "/ hand-tool / c / p 10

git-svn fails to commit back to svn repo despite clean rebase -

I am using git-svn which feels like years without any problem. My usual workflow work, committed, ..., work, committed, rebase, DCIT All of a sudden I started getting this error today: < code> $ git svn rebase current branch master is up to date. $ Git SVN dcommit assertion failed: (svn_uri_is_canonical (child_uri, zero)), function uri_skip_ancestor, /SourceCache/subversion/subversion-62/subversion/subversion/libsvn_subr/dirent_uri.c, line file 1519 Error: Git-SVN signs of death In case of a bus it is a related version: $ Git --version Git version 1.8.3.4 (Apple Git-47) code> I have a change in hiding the guitar, but there has never been a problem before this, can it be now? have went another thing that changed recently, he was our Anfudl repo (which is hosting the central SVN repo) grew out of recent space and we paid for a large plan Had to; But after increasing the plan size, I was able to dcommit it until Friday afternoon. I have had some other people

php - foundation menu is not working in CodeIgniter -

I'm new to the foundation framework and I'm trying to integrate the foundations with CodeIgniter. Everything is working but the menu part is not working It seems that the style is not affecting the menu. I have been working on it for 2-3 days, please help me solve it. & lt ;; Doctype html & gt; & Lt; Html class = "no-js" lang = "en" & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" /> & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1.0" /> & Lt; Title & gt; Foundation | Welcome & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "& lt ;? php echo base_url (). 'Public / lib / found /' ;? & gt; css / foundation.css" /> & Lt; script src = "& lt ;? php echo base_url (). 'Public / lib / found /' ;? & gt; JS / vendor / moderngraj.js" & gt; & Lt; / Script &

Responsive table containing images in HTML and CSS -

Image
Therefore, I am working on a website for a photographer. I'm trying to create a responsive or 'fluid' grid (a table, 2 rows and 4 columns) in the form of a menu to link to the gallery. There is something like the original idea here (for some reasons it allows me to upload this image but I do not come to post it because I do not have 10 reputation, so here is the link) Only white squares will obviously be replaced by thumbnails for each gallery page. There are two things that I want to do with this layout. First and foremost I want this table to be fluid, which I can use this CSS script: @charset "utf-8"; / *************** * Fluid grid album menu * / *********************************************************************** @media only screen and (max-width: 1020px {table, thread, tbody, th, td, tr {display: block; font-family: calibri;} thread TR {status: full;} TR {border: 0px;} td {border: none; position: relative;} TD: first {status: relative; padding

c - What happens when I fopen a file (RAM and ROM matter) -

This question came to my mind because I am trying to speed up my program. I have read data from a file and I use classical as always: FILE * fp; Fp = fopen ("c: \\ test.txt", "r"); There is a structure in the FILE indicator that I do not understand very well. The main question is: When I put a file in RAM or every time I use the file pointer, it reads it from HD is? OS: Linux Mint, GCC compiler returned indicator one Black-box is an indicator for the structure. You should not understand the real structure, just how to use the pointer to it. What's happening, the fopen function dynamically allocates this structure (e .g malloc ) and gives an indicator. The structure is in virtual memory , which can be in RAM or in swap (if you have swap enabled). The indicator itself is a store - sometimes compiler stores variables (local variables on stacks, global variables elsewhere). No matter where the variable is stored, it is stored in virtua

database - Oracle SQL Developer - Adding Constraints on Foreign Key -

I'm new to Oracle SQL and I'm having a hard time adding an obstacle. I am trying to add obstacles in my table to implement specific business rules which only allow students to take up to 4 courses and a maximum of 25 students per class. Please tell me what additional information I need to help me answer this question. I am in a loss ... Make Table Grade (STU_ID int not gross enabled, CRSE_ID CHAR (9) No, enable enabled, STU_CRSE_GRADE VARCHAR2 (20) Check (STU_CRSE_GRADE = 'A' Or STU_CRSE_GRADE = 'B' or STU_CRSE_GRADE = 'C' or STU_CRSE_GRADE = 'D' or STU_CRSE_GRADE = 'F'), CONSTRAINT GRADES_PK Primary key (STU_ID, CRSE_ID), Obligation fk_Grades Foreign Key (Stu_ID) reference student, obligation fk_Grades_Crse_ID foreign key Crse_ID Reference Reference Course); No problem! See tables below: Make table students (Stu_ID int constraint pk_Stu_ID Primary key, stu_name VARCHAR (255) No, No. Stu_Add varchar (255), Stumaj CHAR (6));

Unable to create a bar chart from json data using d3.js -

I'm trying to get a chart running on an example basis. & lt; Body & gt; & Lt; / Body & gt; & Lt; Script & gt; var width = 960, height = 500; var margin = {top: 20, right: 20, bottom: 30, on the left: 40}; // data var data = [{"x": "A", "y": 0.15}, {"x": "b", "y": 0.10}, {"x": "c", "y ": 0.35}]; // X and Y scale var var xScale = d3.scale.ordinal () .rangeRoundBands ([0, width], .1); var yScale = d3.scale.linear () .Range ([height, 0]); // X and Y axis var xAxis = d3.svg.axis () .scale (xScale). Core ("bottom"); Var yAxis = d3.svg.axis () .scale (yScale). Example ("left"). Tike (10, "%"); // svg container var svg = d3.select ("body"). Append ("SVG") .attr ("width", width + margin.left + margin.right) .attr ("height", height + margin) .top + margin.bottom) .append ("g") .attr ("Conv

polyhedron in openSCAD yields "No top level geometry to render" -

I do not find that this polyhedron does not give me a "top-level geometry error" to render all the triangles Correctly oriented, "thrown-together" - The view shows only yellow-out faces, this is my code: top_width = 39; Bottom_width = 51; Col_offset = 6; Length = 160; Height = 40; Rows = 10; Column = 40; Top_row_width = top_width / rows; Bottom_row_width = bottom_width / rows; Col_length = length / column; Walls = 0.4; Box(); Module box () (multi-point (number = [[[[// point 0, 0, height], [[1 point 1 length, 0, height], [// point length, top_ mode, height], [3 digits 3, top_width, height], [// dot 4 0, 0 + cola offset, 0], [[5 point 5 length, 0 + coloffoff, 0], [// point 6 length, bottom width + coloffaseet, 0], [// 0, bottom_width + cola offset, 0]], triangle = [[3,1,0], [3,2,1], [4,5,6], [4,6,7 ], [7, 2,3], [6,2,7], [4,3,0], [4,7,3], [1,2,5], [1,2,5], [2,6, 5], [0,1,5], [0, 54,4]];} Any indication is highly appreciated, thanks in advance! Well I am

css - HTML input text: increase text size without changin input size -

Image
I am using a 4 digit password; The points representing each character are very small; I would like to increase font size; But I want to change the input size. I have it: & lt; Input class = "pin_code" type = "password" maxlength = "4" /> If I & lt; Input class = "Pincode" type = "password" maximum number = "4" style = "font-size: 30px add" /> Then the input also increases the size; How can I make text / dots only to get bigger? I added & lt; Input class = "pincode" type = "password" maxlength = "4" style = "font-size: 30px; height: 24px" /> And now I get this: To solve this, I think we have to close the top and bottom with the same distance and just show the middle part (with the text line). To turn it off, we need an envelope around the input field, keep the input field appropriately and set the overflow: hidden for the w

"No data available in table" in DataTables -

When I try to populate my table, I get a message, here is the simplified code. $ ("# showUsers"). ("Click", function () {$ .ajax ({url: $ ("# example"). $ ("# Output"). $ ("# Output"). DataTable ({"Aadata": data , "", "Ato column": ["sTitle": "movie", "amatapop": "movie": "name", "mdtopop": "name", "s default content": ""}, {"sTitle" , "sDefaultContent": ""}}})))}}}};}); and & lt; Table id = "example" & gt; & Lt; Thead & gt; & Lt; Th & gt; Name & lt; / Th & gt; & Lt; Th & gt; Film & lt; / Th & gt; & Lt; / Thead & gt; & Lt; / Table & gt; Valid JSON has been specified as data class = "lang-js prettyprint-override"> [{" "Name": "donation", "movie": &qu

php - Call to a member function fetchAll() on a non-object -

इस सवाल का पहले से ही एक उत्तर है: < / p> 8 जवाब मुझे पता नहीं क्यों एक गैर-ऑब्जेक्ट त्रुटि पर सदस्य फ़ंक्शन फ़ेच करें () को कॉल करें क्योंकि मैं _sth ऑब्जेक्ट पर fetchAll विधि का उपयोग कर रहा हूं। क्या कोई यह जानता है कि यह ऐसा क्यों करता है? FormValidator PHP $ users = $ this- & gt; _db- & gt; क्वेरी ("SELECT * FROM $ ruleValue $ input = ? ", सरणी ($ inputValue)); अगर ($ उपयोगकर्ता- & gt; गिनती ()) {$ this- & gt; addError ($ इनपुट, $ नियम); } विधि सार्वजनिक फ़ंक्शन क्वेरी ($ sql, $ params = array ()) {$ this- & gt; _sth = $ this- & gt; _dbh- & gt; तैयार ($ sql); अगर ($-> यह- & gt; _sth = $- >- ($ params)) निष्पादित करें ($ params)) {वापसी $ this- & gt; _sth- & gt; फैल सभी (PDO :: FETCH_OBJ); } विवरण झूठा है; } यदि ($ this- & gt; _sth = $ this- & gt ; _sth- & gt; निष्पादित करें ($ params)) < एकल = एक असाइनमेंट ऑपरेटर है execute () एक बूलियन TRUE या FALSE देता है,

java - How to convert big floats to int -

मैंने java और php में एक प्रोग्राम लिखा था। जिसमें एक लूप चलाता है 64 बार और n से n जोड़ना जारी रखें: जावा कोड: सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {डबल एन = 1; डबल पी = 1; के लिए (इंट आई = 1; आई & lt; = 64; i ++) {n = n + n; पी = पी + एन; } System.out.println (p); } PHP कोड: & lt;? php $ n = 1; $ p = 0; ($ i = 1; $ i & lt; = 64; $ i ++) के लिए {$ n = $ n + $ n; $ p = $ p + $ n; } गूंज ($ p); ? & Gt; और इनमें से दोनों का आउटपुट है: 3.6893488147419E + 19 अब मैं जानना चाहता हूं क्या यह बड़ा फ्लोट को बदलना संभव है? यदि हां, तो कैसे दोनों भाषाओं में। मैं इस प्रकार का उपयोग करेगा, सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {BigInteger n = BigInteger.ONE; BigInteger p = BigInteger.ONE; के लिए (int i = 1; i & lt; = 64; i ++) {n = n.add (n); p = p.add (n); } System.out.println (p); } आउटपुट है 36893488147419103231 संपादित करें आपकी टिप्पणी के आधार पर, आप वास्तव में कुछ और पसंद करना चाहता था - बिगइन्ट

javascript - y-axis of chart.js charts is scrambled -

Image
So for the reason that I am generating graphs with chart.js, the Y-axis is fully scalable There is no point! Does anyone know how to fix this? Here is my code: & lt; script type = "text / javascript" & gt; Var chartDataSource2 = {{json_encode ($ micromarket_participants)}}; DxChart ({Data source: Chart data source 2, General service settings: {argumentField: 'id'}, series: [{name: 'minSingleCareFee', valueField: 'minSingleCareFee') {$ (function () ($ (function () {$ ("# chartContainer2") , Type: 'bar'},]});}) & lt; / Script & gt; & Lt; div id = "chartContainer1" style = "height: 400px;" & Gt; & Lt; / Div & gt; im just having the same and i found out what the problem is Error numbers can be in the data source, pass the array to any URL without any chart.js function For example, data source = [{time: "08: 00 ", a: 10, b: 10}]; but not data source = [{tim

c++ - gcc and g++ library search paths -

I had my system compiled under a system with gcc 4.1.1 and g ++ 4.1.1 Was there. IT gave me more systems, with GCC 4.1.2 and G ++ 4.1.2. When I run with the -v option, it says that except for the unjoined directory "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../ ../../ / c ++ / 4.1.2 / x86_64-redhat-linux "ignore unidentified directory" /usr/lib/gcc/x86_64-redhat-linux/4.1.2/ "Ignore unidentified directory" / usr / lib / gcc / x86_64-redhat-linux / 4.1.2 /../../../../ x86_64-redhat-linux / include " However I find that < / p> find / usr-name stddef.h/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h I used the GCC for i386 and 4.1 How do I use a different search path for? 1, instead of 4.1.2 and x86_64? This will indicate that the establishment of GCC is not complete. You may need to install (e.g., sudo yum install libstdc ++ - devel glibc-devel ). It will assume that the standard code is actually installed using the standard p

jquery - display a div after its contents is loaded -

I have a box on my website that includes images, texts and links. It is a carousel. What I am trying to do is display the div when all the content is loaded. Here's my html: & lt; div id = "slideshow" & gt; I want to use ambiguity 0 siwtch opacity 1. & Lt; Div id = "carousel" & gt; & Lt; Li & gt; & Lt; A href = "n / article-1 /" & gt; & Lt; IMG width = "657" height = "394" src = "wp-content / upload / 41.jpg" square = "image_slideshow wp -post-image" alt = "4" nopin = "nopin" /> gt; & Lt; / A & gt; & Lt; Div class = "weekend" & gt; & Amp; Nbsp; & Lt; / Div & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A href = "n / article3 /" & gt; & Lt; Img width = "657" height = "394" src = "wp-content / upload / 21.jpg" square = "image_slideshow wp -

php string replacement in vbulletin product -

मुझे यू = 2 में बदलने की आवश्यकता है $ banuserurl = $ vbulletin-> और ; विकल्पों [ 'bburl'] '/ misc.php?' $ vbulletin- & gt;।। सत्र- & gt; वार्स [ 'sessionurl'] 'करते हैं = ccb_banuser & amp; यू = 2';। exec_header_redirect ($ banuserurl); यू = $ vbulletin-> gtc ['ccb_newmessage'] लेकिन ऐसा करने से ऐसा काम नहीं है = / मैं गलत क्या कर रहा हूँ = (< / p> $ cybcb_checkban = strpos ($ vbulletin- & gt; जीपीसी ['ccb_newmessage'], '/ प्रतिबंध'); अगर ($ cybcb_checkban) = $ गलत और $ cybcb_candelall) $ $ vbulletin- & gt; जीपीसी ['ccb_newmessage'] = str_replace ('/ प्रतिबंध', '', $ vbulletin- & gt; जीपीसी ['सीसीबी_नेटस']); $ banuserurl = $ vbulletin- & gt; विकल्प [ 'bburl'] '/ misc.php?' $ vbulletin- & gt;।। सत्र- & gt; वार्स [ 'sessionurl'] 'करते हैं = ccb_banuser & amp; यू = $ vbulletin- & gt; जीपीसी ['। ccb_n

database - Why am I getting "error code 1005 can t create c errno 150 mysql "? -

Edit # 2: - After the reply of Spencer 75 93, that is, The table was successfully created and the foreign key was added successfully but without adding the foreign key , and then adding them using the alter table statement Now I wonder why? When we create tables and then add foreign key constraints using the alter table statement, why does this work, and when we make it the table statement? I am creating the following tables in my database, the first two were successfully created but the third is giving this error. I checked my database for those points in which I could understand. Please tell me why I got this error. create table (AIID INT (255) tap AUTONCrment, name VARCHAR (5000), code VARCHAR (5000), primary key (A_ID)); Make Table B (BIIDIT (255) tap AUTANCCimment, B_NAN VARCHAR (5000), Primary Key (B_ID)); CREATE TABLE C (- Error code 1005 TC errno can create 150 mysql a_id INT (255), - FK b_id INT (255), - FK primary key (a_id, b_id), foreign key (a_i

How to replace HTML element with JavaScript element or clone of it? -

How to replace the HTML element with the JavaScript element or its clone (without deleting the HTML element)? I was wasting a lot of time trying to make javascript: Clone the HTML text box / create new JS textbox Change the JS text box without removing the HTML text box to the HTML text box / without leaving the clone of the HTML text box. I can not find the solution. Here the code is - & gt; I'm getting into [object HTMLInputElement] output ... & lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/ 1.11.0 / jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Html lang = "en" & gt; & Lt; Body & gt; & Lt; Td> & Lt; Input class = "inputtext" name = "first" id = "first" tabindex = "1" type = "text" & gt; & Lt; / Td> & Lt; Td> & Lt; Input class = "inputtext" name = "seconds" id = "seconds" tabin

bash - Running script existing in another folder -

मेरे पास कम से कम फ़ोल्डर्स में दो स्क्रिप्ट हैं: / folder_aaa / bbb / ddd / 1 .sh /folder_aaa/ccc/eee/2.sh मैं 1.sh स्क्रिप्ट से 2.sh स्क्रिप्ट को चलाने के लिए चाहूंगा। मुझे 2.sh स्क्रिप्ट के लिए पथ कैसे लिखना चाहिए? 1.sh: DIR = / .. / .. / ccc / eee / SCRIPT_NAME = "2 .sh "$ {DIR} / $ {SCRIPT_NAME} कोड से ऊपर है (विशेषकर डीआईआर रेफरेंस) ठीक है? आप बस ../../& lt; DIRS & gt; का उपयोग नहीं कर सकते क्योंकि .. उस पर निर्भर करते हुए बदल जाएगा आप हैं, यही वही है जो $ PWD है; .. है का उपयोग करते हुए स्क्रिप्ट के बजाय। असलीपाथ और डायनाम नाम startdir = "$ (का उपयोग करके) dirname "$ (realpath" $ 0 ")") "स्क्रिप्ट =" 2.sh "" $ startdir "/../../"$ स्क्रिप्ट" पूर्ण पथ का उपयोग करना < / h3> यदि आपके पास realpath और dirname तक पहुंच नहीं है या उनका उपयोग नहीं करना है: यदि आपको पता है कि 2.sh और 1.sh में कभी परिवर्तन नहीं होगा, तो आपको 2.sh "$ HOME&q

javascript - Getting parse error message in wordpress -

त्रुटि संदेश प्राप्त करना: पार्स त्रुटि: वाक्यविन्यास त्रुटि, अप्रत्याशित '& lt;', उम्मीद '') ' मैंने अपने functions.php को संपादित किया है और मुझे इसे फिर से काम करने के लिए वापस नहीं मिल सकता। पता नहीं कैसे इसे रीसेट करें या यहां तक ​​कि वर्डप्रेस उपस्थिति और gt; संपादक & gt; Functions.php यह हुआ होगा क्योंकि आपके द्वारा दर्ज कोड में आपके पास एक गलती है। इसे ठीक करने के लिए आपको functions.php फ़ाइल में किए गए परिवर्तन को पूर्ववत करना होगा। आपको इसे एफ़टीपी एक्सेस या कंट्रोल पैनल के साथ करना होगा। functions.php फ़ाइल निम्न स्थान में पाई जा सकती है: [INSTALLATIONFOLDER / wp-content / themes / THEMENAME / functions.php एक बार जब आप उस फ़ाइल को मिल जाए, उसे संपादित कर लें और आपके द्वारा किए गए बदलावों को पूर्ववत करें।

java - AlarmManager effect on battery for an Alarm clock app -

I want to build an alarm clock app for Android I have an alarm manager Which starts the service every 1 second to check the system time. I now have 3 questions: 1- Is there any other way to check the system 1 second time? And what is the best way to do this work? What is this my way on a 2-battery charge? Is this the reason for reducing battery charge too fast? What is the Android Alarm app in which system to check time? Please help me create this app thanks < p> Why do not you just use the functionality of the alarmmanger, and try and do not invent it yourself. Actually, it allows you to call for a service at a predetermined time (what you probably want to do eventually). The suggestions you give will be very problematic for the battery, and a good attitude.

javascript - Getting radio button group values using only CSJS -

I've read, but it does not really provide a customer-side solution. I have a radio button group that determines whether other things will be visible or hidden or not I have code that will get value in this RB group's XP: script block. getPTValue (bName) function {var pt = null; (var i = 0; i & lt; document.forms [0] .elements.length; i ++) {if (document.forms [0] .elements [i] .name == "# {id: PayType} ") {If (document.forms [0] .elements [i]. Checked == true) {pt = document.forms [0]. [Original] [Original]. value; break; // If it is removed for check boxes, groups and instead submit multiple values ​​above}}} return pt} There is a radio button group; & lt; xp: radio group id = "pay-type" value = "# {FInvoiceDoc.PayType}" defaultvalue = "hourly" style = "color: RGB (0,0,0)" & gt; & Lt; xp: Select item item label = "hourly" item value = "hourly" & gt; & Lt; / XP: selectIt

How do you print in a Go test using the "testing" package? -

I'm running a test in Go with a statement to print something (i.e. for the debugging of tests), But it is not printing anything. Funk testPrintSomething (t * testing.T.) {Fmt.Println ("Hi Hi"}} When I run a test on this file , This output is: OK, Command-line-Arguments 0.004s Actually the only way to print it, as far as I know , It is printed via t.Error (), such as: Funk testPrintSomethingAgain (t * testing.T.) {T.Error ("Say hi")} Which outputs to this: Say- Failure: Testing something (0.00 seconds) foo_test.go: 35: Say, A Fruit failed command-line arguments 0.003s gom: get out of position 1 I've seen through Googled and manual but found nothing. There is another way between the strokes and the two that are looking for you. fmt.X print statement do work inside the tests, but you will find that their output is probably not on the screen where you find it , And therefore, why should you use the logging methods in the

ImageButton Click Action Android -

I have stored image button information in an XML, this image is path, width, height and so on but since many images , I want to store the data of each image button, while it has been clicked. For example, if there are two buttons named Men and Women, then I want to set the string value = "male"; If the male image button is clicked but it did not work. Can anyone help me? Public Zero AddAllImageButtons () throws IOException {AbsolutLayout Layout = (AbsoluteLayout) findViewById (R.id.layout1); ImageButton BTN = new image button (this); Layout.addView (btn); Absolute layout Layout After Hours = (Full Layout Outline) BTN GallawayParam (); AbsParams.x = x; absParams.y = y; btn.setLayoutParams (absParams); Btn.setBackgroundDrawable (zero); btn.setImageBitmap (BitmapFactory.decodeStream (getAssets () open (path)).); If (element.edu ("imagebutton" );}}); } The ID is the Image Button ID that is created in the xml file. The Alertbox text for this example does not sh

angularjs - Angular Expressions Missing in Dynamically Generated Template -

I was dynamically filtered into the final markup that ended with the guideline (using a function) and angular expressions Is on the screen I have made one. I am dynamically generating the template because we were required to generate markup based on properties inside the element. Basically when defining such an expression: angular. Modules ('ui.directives', []). Instructions ('Uber', function () {return {restricted: 'e', ​​template: function (element, ethers)) {console.log ('hello'); Return '& lt; Div & gt; lol: {{User}} & lt; / Div> ';}};}); And keep it in the body: & lt; Div ng-app = "myApp" & gt; & Lt; ui-bar & gt; I should change iambar & lt; / ui-bar & gt; & Lt; / Div & gt; The resulting markup is: & lt; div ng-app = "myApp" class = "ng-scope" & gt; & Lt; ui-bar & gt; & Lt; Div class = "ng-binding" & gt; LL: &

android - WiFi is not supported by emulator -

Can anyone tell me how can I test the Android WiFi program on the emulator? I searched and found that WiFi is not supported by emulator. No, if Android emulator does not support WiFi, then do not waste your time. Although you can try other options, I suggest you use

winbugs - Defining new functions and distributions in the BUGS/JAGS/STAN language -

I am a very new statistical analysis world and I have recently been interested in Bugs / JAGS / Stan modeling language. Something that really surprises me that I have not defined any instance of new tasks or delays to avoid code duplication. For example, say that I often use the square of poseon distribution, is there anyway to do this? dsqpo & lt; - Function (lambda) {tmp ~ dpois (lambda) tmp2 & lt; - TMP * TMP return (TMP2)} and then later model {... x ~ dsqpo (alpha) y ~ dsqpo ( Beta)} each time without defining a new variable variable For Stein, the work will be available with the next release in the current release, v2.2.0, in user- Defined tasks are not as part of language. For the proposed syntax, see: For additional sten-related help, check out the Stan-User Google Group:

c++ - Finding BUTTON of another program -

I am trying to click on my program to program another program. The issue I'm having problems with is identifying button handles. This is my code so far: Bull Callback EnumChildProc (HWND Window Handle, LPARAM lParam) {cout & lt; & Lt; "hwnd_Child =" & lt; & Lt; WindowHandle & lt; & Lt; Endl; Cout & lt; & Lt; "Window id:" & lt; & Lt; GetWindowLongPtr (window handles, GWLP_ID) & lt; & Lt; Endl; Return TRUE; } HWND windowHandle = searchwidth (tap, "name of program window"); EnumChildWindows (Window Handle, EnumChildProc, 0); What is happening so far that I'm getting the handle of the original window of the program. With that handle, I use the EnumChildWindows function to go through every child's windows ... and in 1 of those hair windows I will have three buttons, out of which I want to press 1 button. In the callback function, I have to add the GetWindowLongPtr () function to get the windo

ios - How do I animate a view on touch? -

Like) Is it all done in drawRect:? Or can I use the animation framework from touch handler? Follow some examples around Github (and the internet) I went ahead and just went to UVView ( Drovercat) and a little simplified "Animate With Dither:".

c# - Building dynamic view based on Fields retruned from DataBase in Asp.Net MVC3 -

I want to render the view on runtime based on the regions returned from the database. Any help should be appreciated, to design the prototype / approach I have the model below, public class DynamicFields {public string propertyName {get ; Set; } Public string propertyType {get; Set; }} In the controller, this list , so based on propertyType, I will need to provide control such as textbox / date time thanks in advance propertyType You create EditorTemplates for each value of propertyType Possible values ​​of _textInput.cshtml (assuming text input propertyType ) @moder DynamicFields @ Html.TextBoxFor (item = & gt; Model.propertyName) _dateTimeInput.cshtml (possible assuming dateTimeInput propertyType ) S) @model dynamikfilds@html. Textbox folder (item = & gt; model. Property name, new {class = "datetime"}) View: @Emileumerable & lt; DynamicFields & gt; @forake (field in field) {@ Html.LabelFor (model = & gt; fie

java - Pause movement of a image with keyboard and enable again -

I have a class named Anemanian Pacan which is to move the keyboard to the keyboard with the keyboard. I want to implement a stopover that waits for a penance when the space bar is pressed, and that key continues again when pressed again. I tried to make a thread but I am a newbie in java. There is no error in the program, but pacman does not move forward. Here are some code: extends the square MiThread thread {Private Anenacin Pacman p; Public MiThread (Anenecin Pacan P) {this.p = p; } @ Override Public Wide Run () {p.move (); }} Public square scenario applies to ZPNL ActionListener {Private MiThread hilo; Animation = new Ancienpacan (); hilo = new mithahabad (anantician); Private class Tidapter KeyAdapter (Public Zero Key) extended (KeyEvent e) {animacion.keyReleased (e); } Public Zero Key Pressed (KEY EVE) {int key = e.getKeyCode (); Hilo.start (); Animacion.keyPressed (E); }} Depending on how you are going to implement it But do not worry it is very easy! You have a key

date - Disable days selection on jQuery datepicker -

"date of today and the date of the next two days" mean that every time a person chooses the first three days on a date It is not possible to select Always (wants to know today (tomorrow, tomorrow and later tomorrow) .... if (! Modernizr.inputtypes.date) {var $ Dates = $ ("input [type = date]"); $ Dates.each (function () {var thisDate = $ (this); thisDate.datepicker ({minDate: thisDate.attr ("min"), maximum date: thisDate.attr ("max"), dateFormat: "mm- dd -Y y "});}); var array = ["2013-03-14", "2013-03-15", "2013-03-16"] Disable only specific dates .... Please people .... Previous *** Strong Text *** .... Can not get help for this .... possible. ... if (! Modernizr.inputtypes.date) {var $ dates = $ ("Input [type = date]"); $ Dates.each (function () {var thisDate = $ (this); Itadet Datacenter ({minDate: 3, maxDate: thisDate.attr ("max"), Datformat: "mm-dd-yy&qu