Posts

Showing posts from May, 2012

php - Why isn't my CodeIgniter Form Validation working? -

I am trying to set up verification on a simple contact form which is created using the form assistant. There is no recognition at all what is wrong? In the code below, the "good" keyword always shows, whether the form is entered in the form, and the saved values ​​set by the set_value are never shown. > Controller // Contact function contact () {$ data ['pageTitle'] = "contact"; $ Data ['bodyId'] = "contact"; $ This- & gt; Load-> Library ('form_validation'); $ Config_rules = Array ('email' = & gt; 'required', 'message' = & gt; 'required'); $ This- & gt; Form_validation- & gt; Set_rules ($ config_rules); If ($ this-> form_validation-> run () == FALSE) {echo "bad"; $ Data ['include'] = "v_contact"; $ This- & gt; Load-> View ('v_template', $ data); } And {echo "good"; $ Data ['include'] = "v_conta

Learning Haskell maps, folds, loops and recursion -

As part of my journey of programming knowledge only, I've only dropped my toe in the world of Haslekel (Moving from, I'm trying one online. However, now I'm stuck on a problem: A simple Create a function, which gives the total amount of an array of numbers. In a procedural language it's easy for me (recursion By using) (c #): Private Ent Sum (Arrayist X, Int i) {if (! (X.Count & lt; i + 1)) {int t = 0 ; T = x.Item (i); t = yoga (x, i + 1) + t; return t;}} all are very fine, though my failed attempt at Haskel The following error occurred as follows: sum sum x = x + sum sum map [1..10] From:) can check: can not create infinite types: a = a -> please Please note that I've only used Haskel for the last 30 minutes! I'm not just looking for an answer, but more clarity about it. I'm not looking for only one answer, but more explanation about it. To the left hand side as the function you applied to sum on x . The

metadata - Where/what is the specification for odata.service meta tag? -

To enable automatic detection of our odata feeds, I want to add some tags to our web app. For example, Nether Dinner has the following tag: & Lt; Link rel = "odata.feed" title = "NerdDinner.com Odata Service - Dinner" href = "/ Services / OData.svc / dinner" /> The problem is that I have 4 different feeds and are unclear if I have permission to add multiple links rel = "odata.service" to the document . Where is the specification for this meta tag? (Let's go to the question, are there any apps that take advantage of this tag that I can use to test the behavior) In order to advertise OData support on your blog, this tag offers a great explanation of this tag: An entry on the Mike is an IE extension about their blog which Can read this header and pop the UI for the data service. Hope this helps

c# cannot be referenced from a static function -

c # newbie here. It seems that this user has given me a very good solution to my problem: But I have no clue how he suggests Gave. Can you please help? This will compile properly, you will definitely have to give thePort . Namespace csWinFormsTest {public partial class} form 1: form {static system. Io Ports Prime port; Port; Public Form 1 () {Initialization (); ThePort = New System. IO.Ports.SierialPort ("COM1"); } Static zero fcn () {MessageBox.Show (thePort.PortName); }}}

ruby on rails - Cucumber could not find table; but it's there. What is going on? -

I am working with cucumber and I am running into difficulties when I run "features of cucumber" I got the error, the cucumber is unable to find my request table, what is the obvious mistake I am doing? Bash: Justin-Zollers-Mac-Pro: conversion justinz $ cucumber usage of default profile ... / Users / Ostmins / GM / RBI / 1.8 / GEMS / RIS-2.3.3 / LIB / Arial / GM_translation. RBI 19: WARNING: Ratna :: Dependency #Version_equities should be removed on August 2010 or after it has been disliked. #requirement Use F-- (: :) Failed Stages (: :) Could not get table 'request' (ActiveRecord :: StatementInvalid) ./features/article_steps.rb:3 ./features/ Article_steps.rb: 2: In 'each' ./features/article_steps.rbazines: in`/ ^ I have a request (. +) $ / 'Features / manage_articles.feature: 7: has been given in' Foo, Bar 'Failure scenario: Cucumber characteristics / Management_which Feature: 6 # Scenario: Conversion 1 scenario (1 unsuccessful) 3 steps

c# - error while updating a database in ASP.NET -

I have trouble updating a SQL database, the problem is not that it is not updated at all, but it Special parameters are not being updated while others are being updated. Here is the code to update the parameter: string EditRequest = "UPDATE request SET Description = @Desc, BJustif = @Justiff, priority = @ priority, requested_system = @ Requested, request_stats = @ condition WHERE "; EditRequest + = "Req_ID = ID"; SqlConnection Deposit_Con = New SqlConnection (Web Configuration Manager. Connection Strings ["DBCon"]. ConnectionString); SqlCommand Submit_comm = New SqlCommand (EditRequest, Submit_conn); Submit_comm.Parameters.AddWithValue ("@ id", request .jQueryString ["reqid"]); Submit_comm.Parameters.AddWithValue ("@Desc", DescBox.Text); Submit_comm.Parameters.AddWithValue ("@justif", JustifBox.Text); Submit_comm.Parameters.AddWithValue ("@Primary", priority list. Selected value); Submit_comm.Param

unit testing - Why does this Assert fail? -

IEnumerable & lt; ReportReceipt & gt; अपेक्षित = नई सूची & amp; lt; ReportRecipipt & gt; () {नई रिपोर्ट रसीद ("फाइलनाम 1", "हैश 1", "कुछ टिप्पणियां 1")}; IEnumerable & LT; ReportReceipt & gt; वास्तविक = नई सूची & lt; ReportRecipipt & gt; () {नई रिपोर्ट रसीद ("फाइलनाम 1", "हैश 1", "कुछ टिप्पणियां 1")}; Assert.IsTrue (expected.SequenceEqual (वास्तविक)); मैं वीएस 2008 के साथ एमएसटीईस्ट चला रहा हूं। अनुक्रमांक निर्धारित करता है कि क्या दो अनुक्रम उनके प्रकार के लिए मूलभूत समानता के तुलना का उपयोग करके तत्वों की तुलना करके समान हैं। यदि आपने अपने वर्ग में बराबर और गेटहाशकोलोड को ओवरलोड नहीं किया है, तो फ़ॉलबैक ऑब्जेक्ट समानता जांच असफल हो जाएगी, क्योंकि अनुक्रम में दो भिन्न ऑब्जेक्ट शामिल हैं।

c# - Is Graphics.DrawImage asynchronous? -

मैं बस सोच रहा था, है Graphics.DrawImage () asynchronous? मैं एक धागा सुरक्षा समस्या से जूझ रहा हूं और यह समझ नहीं पा रहा कि समस्या कहाँ है। अगर मैं जीयूआई थ्रेड में निम्न कोड का उपयोग करता हूं: संरक्षित ओवरराइड शून्य ओनपेंट (पेंटएवेंटएर्ग्स ई) {लॉक (_बेटमैप सिंक्रूट) {e.Graphics.DrawImage (_bitmap, _xPos, _yPos); }} और एक अलग थ्रेड में निम्न कोड है: निजी शून्य RedrawBitmapThread () {बिटमैप newBitmap = नया बिटमैप (_width, _height); // ड्रा बिटमैप // बिटमैप पुराना बिटमॅप = नल; लॉक (_bitmapSyncRoot) {oldBitmap = _bitmap; _bitmap = newBitmap; } अगर (पुराना बिटमैप! = नल) {oldBitmap.Dispose (); } आमंत्रित करें (अमान्य); } क्या यह एक ऐक्सेसइलाइलेशन अपवाद समझा सकता है? कोड कॉम्पैक्ट ढाँचा 3.5 के साथ विंडोज़ मोबाइल 6.1 डिवाइस पर चल रहा है। संपादित करें: कोई बात नहीं, यह तब भी होता है जब तरीकों को एक ही धागे में निष्पादित किया जाता है .. अच्छा, DrawImage async नहीं है रूपरेखा स्वचालित रूप से इसे async नहीं बनायेगा इसके अलावा, अधिकांश एएसआईएनसी ऑपरेशन्स में '

Cant apply color theme to one frame in Emacs? -

My .emacs is a file when I am in Shell-mode , Then I want to change the theme but what happens is that the theme applies to all windows -Mod-hook 'color-theme-monoca-terminal) (set-variable' color-theme-is-global Zero) These are the same lines in my .emacs file What should I do to make this work? I usually start MXS as a daemon and then open the frame. I use different color themes for X frames and terminal frames: ('Color theme is required) (color-theme-initialize) (Diffuse color-theme) (Frame) "Apply color (color-theme-tango) (color-theme-tango-black) (whether color-theme-tango-black)) Can take place (set-color-theme-is-global zero) (if window-system ...) for your shell-script-mode and color-theme-x parts and your favorites Check with the subject. There is a downside to this: If you do not start the amax as a daemon, then the customization will only kick after creating a second frame, which is the first pop up That would have been the stan

generate excel in java -

I want to generate Excel with automatic filtering option enabled. For that I have created a template excel file by enabling automatic filter option but when I write something in that template excel file auto-filter option, it is again disabled. Is there a solution to create an Excel file by enabling Auto Filter option? Not sure that this is what you are searching for (and you do not really tell this How do you write a file today?) "Create an Excel file by enabling auto filter options" Actually I do not understand There is that I used to create excel files and it Does it work very well, were you using it to write excel files?

sql server - Conversion failed: SqlParameter and DateTime -

I'm changing old with SqlParameters, weak SqlCommands, but get a SqlException: < p> system .Data.SqlClient.SqlException { "conversion failed when converting character date string."} the sqlCommand.ExecuteScalar : < Pre> dim sqlString string = _ "SELECT TOP 1" & amp; _ "FSL" & amp; _ "FROM" & amp; _ "TabData ASD" & amp; _ "WHERE" & amp; _ "D.SSN_Number = '@SSN_Number'" & amp; _ "And Diffproduct type = 1" & amp; _ "And D.Repair_Completion_Date & gt; '@Repair_Completion_Date'" & amp; _ "Order bye" & amp; Try Dim obj sqlCommand as the object dim sql command as "D.Repair_Completion_Date ASC" sqlCommand = New SqlCommand (sqlString, Common.MyDB.SqlConn_RM2) sqlCommand.CommandTimeout = 120 sqlCommand.Parameters.AddWithValue ("@SSN_Number" , myClaim.SSNNumber) sqlCommand .Parameters.AddWithValu

How to run Javascript code before document is completely loaded (using jQuery) -

I'm sharing a tip with you. Please add this discussion. Page loads compared to Javascript. Jquery functions are removed when related elements are loaded, instead of full pageload. Normal practice is> or & lt; Body onload = "javascript: document.getElementById ('user_id'). Focus ();" & Gt; The code from which we want to run correctly when loaded on the page. Problematic, however, the code is not run until all the image downloads are finished (this includes banner ads). The reason for using window.onload in the first place is due to the fact that HTML 'document' is loading yet, when you first try to run your code, bypassing both problems, jQuery is a simple The statement that examines the document and waits till it is ready, is known as a ready event $ (document) .ready (function ( ) {/ Your code here}}; If you want to run a script before a document is ready, just Inline script such as & lt; Div & gt;

Can I set an environment variable for an application using a shortcut in Windows? -

I anticipate that I should add a directory to the environment variable on the application-lifelong basis, but I do not know how to for. Is it possible to add a parameter to a shortcut windows shortcut, which adds a directory to the existing value of PATH for the use of linked applications? Perform a shortcut file (.cmd), < Li> sets the environment variable Execute the app You use "start" to execute the app, this app will start in another process, but It will copy the environment. You do not wait to finish the app You can now exit the batch file. Should look like this: @heoho set path =% path%; C: \ "My path to extract" folder \

tsql - T-SQL - how to get around the order by restriction in CTEs -

I have the following CTE, its purpose is to provide unique month / year pairs. Later code will use CTE to create a concatenated string list of months / year pairs ;. As with tblStoredWillsInPeriod (Separate Kctc.GetMonthAndYearString Select (DateWillReceived) from Kctc.StoredWills Where DateWillReceived Months '2010/01/01' and DateWillReceived by '2010/03/31' order) I have not shown the implimentation of the GetMonthAndYearString function as this is a minor thing. EDIT: As requested by Martin, the surrounding code is here: as announced above @PivotColumnHeaders nvarchar (MAX) --CTE announcement - - Select @PivotColumnHeaders = COALESCE (@PivotColumnHeaders + ', [' + Month + '],' ['+ + + Month +']) with tblStoredWillsInPeriod selection @PivotColumnHeaders Unfortunately From, it seems T-SQL is always one step forward. When I run this code, it tells me that I do not have permission to use the command in CET unless I use the top (or

objective c - How can I run Gcov over an installed Cocoa application? -

I have a Cocoa app that uses an installer I want to be able to run code coverage on code ( After it has been installed). This is not a common unit test scenario, where a binary test will run a suit. Rather, the question will interact with the testing UI and the app back-end, while this is going on, so I want to know that GCOV is doing this profiling and then runs a test against it. Any thoughts? Update Why I made this question clear: The mistake I made was thinking that The object, .gcno and .gcda files were to be installed with binaries (thus making the installer difficult). As soon as the original location of the files is hard-wired in the code, which contains the instrumentation code. The solution I went with is zipping on the code construction machine and putting it on the test machine on the disk. lcov (or just gcov ) can be run from there. Alternatively, .gcda files will be created on disk and they must be copied back to the machine containing the source code

plsql - confusion about using types instead of gtts in oracle -

I am trying to change the query as follows so that I do not have to use GTT: <('Home', 'Full Name, DoB)' (Home, LNA, FNA, MI, Full Name, Select from 'DOB' ('RE' Home, MBR_list_name lname, MBRFAST_Name FNN, MBRMI MI), Mbr_first_name || mbr_mi || mbr_last_name fullname, mbr_dob dob to table_1 a, table_b where a.head = b.head and mbr_number = '01' and mbr_last_name = v_last_name) c above is just a sample but Jati The questions are bigger than this. The above is within a stored procedure, so to avoid GT (my_gtt_table_1). I did the following: Type or type Lname_row object (home varchar2 (30) lname varchar2 (30), fname varchar2 (30), MI four (1), fullname VARCHAR2 (63), dob DATE) Type lname_exact as a table of lname_row or replace it Now in SP: type lname_exact The table is & lt; What_table_should_i_put_here & gt;% rowtype; Tab_a_recs lname_exact; In the above, I'm not sure what my query is as a sub-category of my qu

c# - Constructing mocks in unit tests -

Is there a way to create a duplicate instead of a real example, when the test code that calls the constructor? For example: Public Class ClassToTest {Public Zero MethodToTest () {MyObject foo = new MyObject (); Console.WriteLine (foo.ToString ()); }} In this example, I need to prepare a unit test that confirms that by calling Methodistost on an example of classostost, actually a new constructed toasting () The result of the method will be the example of MyObject. I can not see a way to actually test the 'Classroom Test' class in different classes; The test of this method will actually test the method 'MyObject.ToString ()' as well as the MethodToTest method. Not really your classster test is difficult to test due to its design If you want to be able to swap your dependencies for the mock objects, then you need to think about how these dependencies are injected - but there is no way to build them in the constructure, which is your help. is. You can u

c# 3.0 - How to change enum definition without impacting clients using it in C# -

I have been defined following Enum I used to underline because this Enum used in logging and custom attribution Do not use me to enter the upper part of the image. We use very heavy logging now the requirement is to change "LoginFailed_InvalidAttempt1" to "LoginFailed Attempt1" If I change this enum, I have to change its value in my application. I can change the underscores from a place inside the entrance of the SP. Is there any way by which I can change it without affecting the whole application? Please suggest. public Enum Akshntaip {there was nothing designed, modified, active, inactive, deleted, login, logout, change password, ResetPassword, InvalidPassword, LoginFailed_LockedAccount, LoginFailed_InActiveAccount, LoginFailed_ExpiredAccount, ForgotPassword, LoginFailed_LockedAccount_InvalidAttempts, LoginFailed_InvalidAttempt1, LoginFailed_InvalidAttempt2, LoginFailed_InvalidAttempt3, ForgotPassword_InvalidAttempt1, ForgotPassword_InvalidAttempt2, ForgotP

visual studio - Resharper 5 - enable/disable on the fly -

I want to disable Receptor 5 while debugging - it slows down the things that I'm ready to take . Is there an automatic way to do this? The next best thing will be the toolbar button to enable / disable manually. On the Tools -> Options -> There is a comment on the page on the reciever that VS command razerGogglusSpaid has done this. The problem is, when I right-click on a toolbar -> Customize ... -> Select the 'Command' tab -> 'Rushper' category. Am I missing something? It seems that the optimization dialog does not show an order that is not related to something "category" And there is no one in ReSharper_ToggleSuspended try it: Using the tool. Options | Assign a shortcut to the keyboard command (listed in it), and use the shortcut instead Or, create a simple macro that will execute a command by name, and put the macro on the toolbar.

Connecting VB.NET to a MySQL Database -

I have a VB.NET application and I need it to be able to display the rows from the MySQL database. How do I do this? Update: There is one more thing I could do, that app gets a PHP page from the site that shows the DB, and receives every 10 pages. Seconds or so on You can use the MySQL connector which you can get from. The lower part of the article tells how to install the connector and connect to the MySQL database. Links show some examples of connection strings.

asp.net - Handle Enter Key on website -

When I enter my login form, the search form at the top of my website runs instead, I'm trying to handle but I'm receiving a missingmemberexception. Protected Sub Page_Load (ByVal Sender as Object, ByVal as System.EventArgs) Dim getButton as new findbuttonControl Dim vButton as ObjectDim Get New as password VPassword = getPassword.getGrandChildValue (Me.LoginView1.Controls, "Login1", "password") VPassword as search control dial vPassword object vButton = getButton.getGrandChildValue (Me.LoginView1.Controls, "Login1", "LoginButton"). Attributes.Add ("onkeydown", "if (event.which = event.keyCode) {if ((event.which == 13) || (event.keyCode == 13) {document.getElementById ('" + VButton + "'). Click (); Return back;}} and {Return};") End of Check out the new Aspiknet 2.0 properties.

Interface function C# -

I have a function that implements the interface. Something like this: String IMI Interface My Function () {Something; } This function is available outside of my class. Everything is working right now I have to call this function from any other local non-public function. Like this: void Func2 () {string s; S = MyFunction (); } The problem is that I get this error: "name my function is not present in the current context" Any help would be appreciated. TY. You have implemented the interface method explicitly. Cast "this" for the interface, and you are there: void Func2 () {string s = ((IMyInterface) this). MyFunction (); }

Do Java arrays have a maximum size? -

Is there a limit to the number of elements in the Java array? If yes, what is it? The correct answer is not seen, even if it is very easy test. In the recent hotspot VM, the correct answer is integer. MAX_VALUE - 5 . Once you go to it: public square fu {public static zero main (string [] args) {object [] array = new object [integer.mx_avn-4]; }} You get: Exception in thread "main" java.lang.OutOfMemoryError: The requested array size exceeds the VM limit

python - Django template Path -

I am following the tutorial in the Windows 7 environment. My settings file: TEMPLATE_DIRS = ( 'C: / django-project / myapp / mytemplates / admin') I Dimango source code (Dijeँgo / Contrib / admin / templates) template from within the default admin template directory admin / base_site.html from base_template in the tutorial instructions as directory administrator subdirectory myapp . This is not affected by any reason what could be a sign of the problem? Do I have to do a sync db? I know that this is not in the Django tutorial, and it's a shame for them, but your pATH variable is preferable to set the relative path you can set it up this way: import os PROJECT_PATH = os.path.realpath (os.path.dirname (__ Fail__)). .. MEDIA_ROOT = are PROJECT_PATH + '/ media /' TEMPLATE_DIRS = (PROJECT_PATH + '/ templates /',) If you like this can move your Dijengo project and your root root Will be updated automatically. This is useful when you are

visual studio 2010 - Get Process ID of Program Started with C# Process.Start -

Thank you in advance for all your help! I am currently developing the program in C # 2010 to launch a clerk to create an SSH tunnel. I am making the program able to keep track of each tunnel which is open so that a user Ending the frequencies that are no longer necessary. I am currently using the system. Diagnostics Process. Clippers to start (currently using the confirmatory). I need to determine the PID of each crust program when it is launched so that a user can finish it. The question is how to do it and I am using the right one. Is Net's name or location better? Code snippet: Private zeros btnSSHTest_Click (Object Sender, EventArgs e) {String puttyConString; PuttyConString = "-ssh-P" + cboSSHVersion.SelectedText + "-" + + + txtSSHPort.Text + "-pw" + txtSSHPassword.Text + "" + + txtSSH u name. Text + "@" + txtSSHHostname.Text; process. Start ("C: \\ Program Files (x86) \\ Putty \\ putty.exe", puttyConStrin

php - Need advice to change my database design -

I need to change the way information is being collected in DB. Since the query is slow with the old model Works from, which I had developed. General Problems are following 1) I have a list of courses, and each course has a list of tag describing the general content of the course. For example, in the course " Database Management Systems", the following tags can be {{em> sql, index, key, relationship }. 2) I have professors, who also have tags which they usually read in their courses. For example, Barton {sql, php, apache, mysql} I need to find all professors in DB which matches better than the specific selected course. Apart from this, I need to sort them according to their weight of matching. I Question The question is how to store this information in DB and solve this problem. How to process this archived information for. This question came up when I got many negative reviews about my SQL query. OK, I start with something like these 5 tables: < Pre-

permissions - Why wouldn't an S3 ACL "stick"? -

We want to set up ACL to access one of our buckets with a partner account. We have tested the test account process and everything works fine. On our production account / bucket, however, we can set ACL and see updates, but as soon as we try to reach the bucket with another account, we get a restricted response. After this, when we see the ACL list for the bucket, the permission has been exhausted. We have tried to use both Amazon's new S3 tool in the AWS Management Console and CloudBerry Explorer and both tools display exactly the behavior. Using the same process to update the ACL from our testing account works as expected (ACL update "sticks"). What would not be the reason for "stick" the ACL? Anyone have any idea about how to solve / solve the problem? It's been a long time since I asked this question, and since then I have worked on this issue Have done As I remember, it appears that some policies had changed the nature, but the legalist stil

finding elements in python association lists efficiently -

I have a set of such lists that look like this: Terms = [["Condition1", ["sample1", "sample2", "sample3"]], ["condition2", ["sample4", "sample5", "sample6"], ...] How can I do the following things in Python efficiently and beautifully? Find all the elements in a certain position? For example, get all samples in Condition2 I can now: In situations: cond_name, samples = cond if cond_name == request_cond: return samples < / Code> but it is clanky. A list of conditions has been ordered? Such as <"> sample 1", "sample 2", "sample 3", "sample 4" (["condition1", "condition2"], conditions) should be returned: , "sample5", "sample6"] How can I do this in Python efficiently? Maybe a clever liner? Ah ok, if you get that clay data structure, you can not expect too much of your first solution

MySQL Table Loop using PHP -

I have an online form that collects consumer data and stores in a dedicated MySQL database. In some instances, in the URL Data is passed under the "RFID" variable which is also stored in the database and is connected to each registration. I use 'mysql_num_rows ($ results)' to get all the agent details on any other page, but it only exchanges all the available details. My goal is as follows: Target I want to create an HTML table in which rows are automatically generated based on the list of all registrations on my site. A new row is created and only if a specific RefID is present on that particular record. In the event the field is zero, it is reported in a row. In short, the HTML table may look like this: RefID - The number of nominations abc123 - 10 Baseball - 11 twonk - 7 NULL - 33 Where abc123 is a special RefID and 10 times that number is refid DB If new registration comes with REFID = "horses", then a new row has been created,

Why images in Crystal Report with white background doesn't show as pure white? -

I am putting an image in a crystal report (using Crystal Reports Visual Studio 2005) Image One with a white background The product is logo, and the report also has a white background, but when I run the report, you can see that it is not quite white, off-white color is barely visible, but when it is printed, it will appear more gives. I have tried several types of image formats, and have also tried transparent images, but they do not work (transparent pixels are black). When I use a different image, I think that unconscious changes the color of non-white - as if it has a color function in the image. Anyone else has to face it? any suggestion? Checking this option can be solved directly in the report: Original Image of Color Depth: Docs says: If you want to keep images in your report to keep the depth of your original color when they are explained Choose this option Otherwise, all images are converted before being converted to 8 bit per pixel. To view this option:

How to limit a user to entering 10 keywords or less using PHP & MySQL? -

I am trying to limit my users to enter at least 10 keywords and wondered How can i do this PHP & amp; MySQL with your current keyword script? Here are the keyword AdWords MySQL code. If (isset ($ _ POST ['tag']) & amp; ($ _POST ['tag'])! == '') {$ Tag = Explosion (" , ", $ _POST ['tag']); ($ X = 0; $ x & lt; Count ($ tag); $ x ++) {$ mysqli = mysqli_connect ("localhost", "root", "", "cite name"); Include $ Query1 = "tag values ​​('.' Mysqli_real_escape_string ($ mysqli, strtolower (htmlentities (trim (strip_tags ($ tag [$ x])))). '' ''); If (! Mysqli_query ($ mysqli, $ query1)) {print mysqli_error ($ mysqli); Return; } $ Mysqli = mysqli_connect ("localhost", "root", "", "sitename"); $ Dbc = mysqli_query ($ mysqli, "tags to select tag = '" .mysqli_real_escape_string ($ mysqli, strtolower (htmlentities (trim

vb6 - vb classic coder to android how to transition? -

I am a VB / vba encoder and would like to start Android Dev. Currently I am learning Java from scratch. It is very difficult to read about OP, but in reality I have never written OO code. Java syntax is also very foreign but I am hanging it. My question is, which is the best transit route for an old dog to write for Fryo? "post-text" itemprop = "text"> I will first focus on learning Java You can read through one of the books here. To begin with Android, read, and work through the basics. Once you are comfortable with those people, you can start developing your own app!

jquery - What's wrong with this code? -

$ ('# PbtnSubmit')। क्लिक करें (फ़ंक्शन () {if ($ ("$ PricingEditExceptions input: चेक बॉक्स: चेक ")। लंबाई & gt; 0) {var chec = $ ('# PricingEditExceptions input [type = checkbox]: चेक किया गया'); var पीएमआरआईडीएस = chec.map (फ़ंक्शन () {वापसी $ (यह) .val ( एट्र ('मान', अपवाद) $ ('# 1_PMstrIDs')। एट्रि ('मान') ('' मूल्य '') , पीएमआरडीआईडी);} अन्य {चेतावनी ("कृपया कम से कम एक अपवाद का चयन करें"); वापसी लौटा;}}); Var चेक = $ ('# मूल्य निर्धारणएडिट अपवाद इनपुट [प्रकार = चेकबॉक्स]: चेक'); यह कोड फ़ायरफ़ॉक्स में सही मान देता है लेकिन IE8 में नहीं। मुझे IE8 में चेक चेकबॉक्स क्यों नहीं मिल रहा है? कृपया कोई मेरी सहायता कर सकता है? < P> आपका "if" कथन यह बंद नहीं है ... IE के लिए, यह मृत्यु द्वारा दंडनीय है:)

c# - SQLITE - INSERT does not return error but no data is inserted -

I am trying to insert data from a C # application into a local SQLite database file. Transaction does not make any errors, but data is not included. The same entry statement works from within the query analyzer. Do I need to commit one? Is there any committee method? The command transaction property is zero. var command = new SQLITMand (Enter.BildInstate (table name, key value pair), connection); Command.ExecuteNonQuery (); Update: I have also tried to know my SQLiteCommand with a SQLiteTransaction but there is no luck. try {SQLiteTransaction} Light Transactions = Connection. Bestunction (); SQLiteCommand command = New SQLiteCommand (insert.BuildInsert (tagname, key valuepayer), connection); order. Transaction = Light Transaction; Command.ExecuteNonQuery (); LiteTransaction.Commit (); } Hold (SQLiteException E) {// Error connection. Stop it (); } The Buildint method creates only one string that is INSERT. The insert works fine in a query analyzer. String.Format (

c# - Can i add watermark on a series of pictures? -

I have a strong picture, which I want to add to the watermark and "protect" them. Is there any way to add watermarks using vb.net or C #? Public Zero AddWatermark (string filename, string watermark text, stream output stream) {bitmap bitmap}

c++ - Pointer to 2D array. Why does this example work? -

I have this code example, but I do not understand that when changing the values ​​in the array, outputUsingArray () The original array is changing. I think that in outputUsingArray () , the value of the array is expected to change, only for the local copy of the array. Why not do that? However, this is the behavior that I would like, but I do not understand why it works. Add # & lt; Stdlib.h & gt; # Include & lt; Stdio.h & gt; Zero Output Usage (int array [] [4], int n_rows, int n_cols) {int i, j; Printf ("use array output \ n"); For {i = 0; i & lt; n_rows; i ++} {for (j = 0; j & lt; n_cols; j ++) {// can be used either // printf ("% 2d ", array [i] [j]); Printf ("% 2d", * (* (array + i) + j)); } Printf ("\ n"); } Printf ("\ n"); Array [0] [0] = 100; Array [2] [3] = 200; } Zero outputupping pointers (at (array *) [4], int n_ro, int nucleos) {int i, j; Printf ("OUre to use array with pointer i

java - How to return an ArrayList from a database query? -

I ask the database for a web service using Jersey JX-RS. I can return a line as XML or JSON, but I did not know how to return many records. Do I use an ArrayList ? if so, how? Does anyone have an example to do this? a roleholder class that defines all the fields from the table Rohnter with @XmlType a list & lt; Rohilder & gt; with the @XmlElement list & lt; ROHOLDER & gt; > - list & rt; Rohilder & gt; List = new linked list & lt; Rohilder & gt; (); While (rsnext ()) {ROHOLDER holder = new ROHOLDER (); Holder.setName (rs.get ("name")); Holder.setSurname (rs.get ("nickname")); Holder.setEmail (rs.get ("email")); // List for all related fields Add (holder); }

data structures - How to implement a queue in Go? -

वर्तमान जाओ पुस्तकालय कतार कंटेनर प्रदान नहीं करता है एक सरल कतार को लागू करने के लिए, मैं अंतर्निहित डेटा संरचना के रूप में सर्कल सरणी का उपयोग करता हूं। यह TAOCP में वर्णित एल्गोरिदम का पालन करता है: कतार में एक्स सम्मिलित करें X: X [R] & lt; -Y; आर एंड lt ;-( आर + 1)% एम; यदि आर = एफ तो ओवरफ्लो क्यू एक्स से वाई हटाएं: यदि एफ = आर तो अंडरफ्लो; Y & LT; -X [F]; एफ एंड एलटी ;- (एफ + 1)% एम। एफ: फ्रंट, आर: रियर, एम: ऐरे लंबाई निम्नलिखित कोड है: पैकेज मुख्य आयात ("fmt") प्रकार पंक्ति संरचना {लेनन इंट हेड, पूंछ इंटेल q [] int} func नया (एनआईटी) * क्यू {रिटर्न और क्यू {एन, 0, 0, मेक ([] इंट, एन)}} फ़्ंंक (पी * क्वू) एन्क्यू (एक्सएंडटी) बूल {पीके [पीटीईईएल] = एक्स P.tail = (p.tail + 1)% p.len return p.head! = P.tail} func (p * क्यू) Dequeue () (int, bool) {if p.head == p.tail { वापसी 0, झूठी} x: = pq [p.head] p.head = (p.head + 1)% p.len return x, true} func main () {q: = नया (10) i के लिए: = 1; मैं & lt; 13; I ++ {fmt.Println (i, q.Enqueue (i))} fmt.Printl

PHP/Codeigniter processing a list with javascript -

I have a list of items that users can choose I want to be more user-friendly than standard checkboxes. So I have a separate ID with unique ID. When an item clicks on an item, I use javascript to display a tick at the top of that object to show the style that it is highlighted. I am trying to do this work as to how I can overcome the ID list when I submit the form. Remember, if a user invents an item, then it should be removed from the list, I was thinking of using a comma-separated values ​​in a secret text field, but working on the way to remove items from the beginning of the list If they were not selected, You can store your list of selected items in a JavaScript array, Like Babakar Said, when you toggle your style, add or remove element in / from array also. Then when you submit the form, write a piece of JavaScript that plugs the array data into hidden fields. In addition, if you are speaking directly in the case of user friendliness, then I have advised in years that

php - image magick ,text arc -

सिस्टम ('कन्वर्ट-साइज़ 320x100 xc: लाइटब्ल्यूयूयूटी -फॉन्ट कूरियर-पॉइंटिस 72' -फिल नेव्ही -नेटोटेट + 25 + 65 \ 'एर्नाकुलम 1 \' - वर्चुअल-पिक्सेल पारदर्शी-डिस्टोर्ट चाप 120 \ -बर्डकारर लाइटब्ल्यू फॉन्ट_arcnew.jpg '); यह सह काम नहीं कर रहा है मुख्य रूप से यह कोड काम नहीं कर रहा है - -वर्चुअल-पिक्सेल पारदर्शी -विस्तृत चाप 120 pls मेरी मदद करो? < Div class = "post-text" itemprop = "text"> सबसे पहले - क्या आपके पास नवीनतम छवि मैजिक आपके सर्वर पर स्थापित है?

Error when doing git pull, unable to resolve -

I'm getting this git error and I do not really know what it means, nor how do I fix it I can: (v_env) [nubela @ nubela-desktop searchplus] $ git bridge from original owner file: /// home / nubela / workspace / _git / searchplus * branch master - & gt; ; Updating the FETCH_HEAD 38f3d5b..fe6028c error: The unwanted working tree file 'searchplus / .project' will be overwritten by merge. I have done the following but have not used any: git clean -f - D GIT reset - hard head Can anyone help me explain? Thank you :) You (or your IDE) have created a file named "searchplus / .project" somewhere This file has also been created in the upstream store. Unless Git refuses to perform the merge phase: Your .project file is destroyed. Your .project file is committed, so a merge can be attempted

php - Unable to show a division tag using JS -

विचार करें, मुझे PHP में यह कोड मिला है & lt;? Php if ( $ Count == 0) {? & Gt; & LT; स्क्रिप्ट & gt; show_my_div (); & Lt; / स्क्रिप्ट & gt; & Lt;? Php}? & Gt; show_my_div () एक डिवीजन टैग दिखाने वाला है। लेकिन यह काम नहीं करता है PHP या जावास्क्रिप्ट में कोई मानक show_my_div फ़ंक्शन नहीं है। कृपया मदद करें। एक div का आउटपुट, PHP में आसान है: गूंज "& lt; div & gt; सामग्री & lt; / div & gt; "; इसी तरह, जावा में एक div तत्व बनाने और इसे कुछ करने के लिए संलग्न आसान है। पृष्ठ के अंत में एक div को जोड़ने के लिए यहां कच्चे जावास्क्रिप्ट है: var div = document.createElement ('div'); Div.innerHTML = "div की सामग्री"; document.body.appendChild (div); आप तत्वों को कहीं भी जोड़ सकते हैं, न केवल अंत में उदाहरण के लिए, मान लीजिए मेरे पास id foo : और div; div id = "foo" & gt; & lt; / div & gt; ... और मैं इसके अंत में पैराग्राफ जोड़ना चाहता हूं: var p, div; Div

Django model timerange filtering method -

I saw the next two methods in an old question but it is not clear to me that what is the difference between: {'date_time_field__range': (datetime.datetime.combine (date, datetime.time.min), datetime.datetime.combine (date, datetime.time.max))} < / Ex> and YourModel.objects.filter (datetime_published__year = '2008', datetime_published__month = '03 ', datetime_published__day =' 27 ') < / Div> It was confused about myself, but I think I have done this: -DI is very much used I found. When you do: YourModel.objects.filter (datetime_published__year = '2008', datetime_published__month = '03 ', datetime_published__day =' 27 ') The SQL will look like this: SELECT ... Where extract ('year' from Pub_date) = '2008' and extract ('pub_date' from 'month') = '03' and extract ('day' to pub_date) = '27'; While this part of the generic date-based visua

git svn - Could git do not store history of specific folders when working with git-svn? -

Briefly: Is there a way to disable full history storage in GIT-SVN repo for specific folder? There is a huge SVN repo with our large checkout. I would like to move it to the guit for my local development, because GIT has used the update and status Enhances the order of magnitude of orders When I simply clone git svn this big repo makes big big then my whole HDD should be bigger problem in the binary directories, for which the history is too big. The latest bills are required for proper local construction, but history is not required for my development process. I will never change them myself I want to store only the latest versions for specific folders, or there may be a history but not more than a week. Only filter for git svn fetch , which does not include specific folders. This is not exactly what I need. It is okay for me to work in a cron, which removes history from specific folders, but I do not know how to create a cron first git svn clone problem Does no

php - Google adsense reference -

My client has a Google Adsense account and an advertising campaign under which there are many ads. The customer needs to identify the incoming users who click on each ad. Cloud Drupal uses PHP site. Is there a possibility to track incoming users coming through Google ads? / P> Use From: Integrate with AdWords and AdSense Optimize your AdWords performance with post-click data on your keywords, search queries, match type and more The AdSense report shows publishers who generate the highest revenue from the content of the site.

visual studio - Convert project from 2008 to 2010 from shell -

Is there a way to replace the Visual Studio Project with Shell from 2008 to 2010? I need to create this during the continuous integration process. I think it's just devenv.exe / solutionfile for solutions instead of [solutionfile .sln] or devenv.exe / upgrade [projectfile.vcproj] update. And just seen, apparently a new tool is called vcupgrade.exe in 2010 which can also be used. See blog post for information about both methods.

Java enums in generic type -

I want to make a generic nem-based mapper for IBTIS. I am doing this with the code below, it compiles errors of time, which I do not have to fix, maybe my solution is just wrong (keep in mind the use of IBTI), in such a way please give some better suggestions. Any help appreciated. What I want to achieve define later mappers: Public class XEnumTypeHandler expanded CommonEnumTypeHandler & lt; X & gt; {} Current code: public class CommonEnumTypeHandler & lt; T extended Enum & gt; Applicable TypeHandler callback throws {SQLException to public peer set parameter (parametersetter ps, object o) {if (o.g.class ()) isAssignableFrom (** T **)) {ps.setString (((** ** (** **) **) o). Value () .toUpperCase ()); } Again, throw a new SQLException ("Stunning Paramater Type Object" from: "+ o);} Public Object throws the GetResult (ResultGetter RS) SQLException {Object o = valueOf (rs.getString ()); if (o == faucet) New SQL Connection ("Unknown Param

c# - Drag and Drop as Multitouch event in WPF -

I want to drag and drag an object into a WPF solution through the multitouch signal. I get two user controls I can drag an item from userControl1 and place it anywhere in my application. It looks good yet, but here's the problem: If I go to userControl1 , then running with drag and placed item userControl1 is. This means that even though I took an item before userControl1 , it is still connected to that userControl I have an item UserControl1 and place it in userControl2 . No data should be binding between the item and userControl1 , when I drag the item out from userControl . Does anyone know the answer to my problem? "Surface toolkit for Windows Touch" in the Surface Dragon View class

website - How can I configure IIS to serve a site when it is asked by ip? -

I have the site configured on www.example.com and example.com xxx190 At the moment, foo.example.com is the same IP Is also configured on the DNS server www is a CNAME alias for example.com How can I do this so that when a request is made, the contents of the server www.example.com Completes, just like there was a request or even? Is changing the foo.example.com of the iPhone to isolate it separately? Thank you very much. go to run> to release inset MGR right click You wesite >> Not >> Properties >> on the tab tab on that tab >> there is a text box on that tab

php - echo POST array.. or other ideas? -

Update: As seen in the original questions below, The problem I am looking for is an array echo, that when I send Moneris Gateway to return a post array in my new file (cart.fp), it receives 500 internal server errors. This is the same error when I sent it to the script, which should have worked. Is there any reason why it always sends 500 internal server errors? The original question: Hello there, I have another question I'm back for This is my dilemma: I have a script (IMAGEFOOLO Commerce) which has not been updated, probably since 2003 on our servers. The script had a payment gateway (Moneris) that was manually added by the company that provides the script. It costs $ 1000 to add a gateway. I now have a new customer, who had bought this business from the previous owner. While switching the account to the new owner's Monoris account, we found out that things have been updated. Long story short .. Send 3 types of responses to the Moneris entrance:

sql server - Failing to connect to Database due to database in recovery -

I am using SQL Server 2008, Developer Edition. I connected my database using my ASP.NET MVC application Linq2SQL. I noticed that my database was about 4 times the recovery mode in a period of one month. I'm running some full Linq2SQL queries. When the database is in Recovery mode, my asp.net mvc application line is shutting down because it can not connect to the database. I do not know how to stop the database from coming into recovery mode. I have seen some questions on SO, but there is no way to solve it. I hope someone can help me There are some possibilities / checks: Is this database part of a log shipping configuration? If this is the case, the secondary server is being restored, then you will be unable to establish a connection to the database. Are you sure you are using the developer version of SQL Server and not the Express edition? Is the autoclus option set to true? If there is no such active user connection, the database will be closed. To check that

What methods other than NHProf allow you to view the dynamic SQL generated by nhibernate? -

NHibernate Profiler I was parsing through the logs generated by log4net before I was released today I use NHibernate Profiler , But what other tools / techniques do exist that allow the developer to see dynamic SQL generated by nhibernate? Check this link: I have never tried to do this Because we had bought NHProf, but I think that there is a potential file in which an IsDevelopment flag is placed in a config file.

sql - rails: Get all items tagged x AND y AND z -

I have two models: items and tags . The name of the two features is that I have to find tagged items with many tags. class items & lt; ActiveRecord :: Base has_many: tags validates_presence_of: name end class tag & lt; Looking at a list of tag IDs, I can easily get a list of items with a tag or tag: ActiveRecord :: base is_to: item validates_presence_of: name end Other: # Tag_ ID Find all items tagged with one or more tags Item: All (: Terms = & gt; [tags.id in (? ), Tag_ids]: = & gt;: tag) If tag_ids , then {1,4} , Then I get all the images tagged with 1, or 4, or both. I now want to know how to get pictures - both are tagged with - and 4. I can not even imagine SQL here. You can group this result and check it out: < Code> Items.All (: Terms => ['tag' IN '(?)', Tag_ids],: Johns =>: Tags, group => Items.id ',: having => ['COUNT (*)> =?', Tag_ids.length])

Perl Encode - UK characters -

This is a part 2 question. So I'm trying to: Encoding functionality but there is no luck at all. Use encoded; Use utf8; # Should print: ISO-8859-15 print "Latin-9 encoding:". Fund_exode ("Latin 9") - & gt; Name. "\ N"; My $ enqueque = encode ("ISO-8859-15", "UK €"); Print "Encoded UK:" $ Nqe "\ N"; Result: Encoded UK: UK € Should not the results be encoded? Am I doing wrong here? Edit: Suggestions added: use utf8; And now I get this: Encoded UK: UK Now pulling the hair: / Do not drag your hair You have done everything right, have finished and already receive the desired data Has been doing; The production is confusing you because you might see it from the terminal which is not set to Latin-9, but for a different encoding, maybe UTF-8 & gt; Perl -e'use utf8; Use encoded; Print Latin-9 "," Euro € "'Euro' Perl -e'use utf8; Use encode; P

c++ - Selective iterator -

FYI: no boost, yes it is, I want to change the wheel again ;) Is there a form of selective iterator (possible) in C ++? What do I want to do to isolate the strings like this: something: word {or other in a form like this: something: word {or other I can do this with two ends and find_first_of (":") and ("{") Disabled I feel that I might have thought that there would be a way to create / define / write which would be repeated with all the values ​​for_each, I am afraid that I have a fulfillment The custom method must be typed - std :: string is a very complex iterator class. So I thought maybe it would be: std :: vector & lt; Size_t> List; Size_t index = mystring.find (":"); While (index! = Std :: string :: npos) {list.push_back (index); Index = mystring.find (":", list.back ()); } Std :: for_each (list.begin (), list.end (), adspace (mestring)); This seems to be messing up for me, and I'm pretty sure there i

c++ - I'm having a problem identifying a floating point exception -

I am using c ++ in Visual Studio Express which is a random expression for use in a genetic algorithm type program Produces trees. Because they are random, the trees often produce (I mean exception to them, I'm not sure what they are) Thanks for a suggestion by, I mask _MCW_EM Turn on so that hardware interrupts are closed (Default) Then, the program is constantly running, but some values ​​are returned: -1. #INF, -1 #NAN, -1. # INV > I do not know how to identify them so that I can remove a remission: if (variable == -1 .INF) There is a solution in DigitalRoss, but as I understood it I could not work it. I'm looking for this simple bit code everywhere, I think everyone will be used time, but there is no luck. Thanks Try it out: #include & lt; Border & gt; If (variable == numeric_limits & lt; float & gt; :: infinity ()) return1;

C segmentation fault before/during return statement -

I print the value that I am returning back to my return statement, and to print back the returned value I'll tell my code right after the function call, however, I get a split mistake after my first print statement and before me (interesting to pay attention, this is always the third time the function is called, anytime before or Second, never Was neither later). I tried to print all the data that I am working to see to be that my remaining code was doing something, maybe it should not be, but by that time my data looks fine. Here's the job: int findHydrogen (struct amino * amino, int nPos, float * diff, int totRead) {struct atom * atom; Int * Bond; Int numBonds; Int i; Int radial; Int numatoms; NumAtoms = (* amino) .numAtoms; Atom = (strip atom *) molk (shapeoff (strip atom) * numAtoms); Atom = (* amino). Atom; Numbonds = atoms [nPos] .numbonds; Bond = (Int *) Mallok (Sizoff (Int) * Newbands); Bond = atom [npo]. Bonds; (I = 0; i & lt; (* amino) .numAtoms; i ++) prin

Getting Printer Status from a Cocoa App -

How can I get a position on a printer from a cocoa app? I have the number of queued jobs and current status of the printer (current, paused, error, etc.). I understood this. Use cup api to get job description for printer. Int nJobs = cupsGetJobs2 (http_, and Task, Zero, 0, Caps_WHichJOBS_ACTIVE);

jquery - jConfirm and onbeforeunload -

I clicked the user, alerted to a browser back button (except for the submit button) or to alert a link On going, they will lose form data from the form wizard. & lt; Script type = "text / javascript" & gt; Var okToSubmit = false; Window.onbeforeunload = function () {document.getElementById ('Register'). Onclick = function () {okToSubmit = true; }; If using the "Backup (OkToSubmit)" browser back button you will lose all form data. Please use the next and backward buttons on the form "; }; & Lt; / Script & gt; I am using the jAlert plug for alerts and I want to use jConfirm for the above function. When I add jConfirm after the "return" Works for This warning pops up and then the page refreshes and the dialog box goes away. Does anyone know how to fix this? I believe that you still need to return false; , otherwise the unload action still happens I'm not familiar with the plugin, but try something like this:

Visual C++ function suddenly 170 ms slower (4x longer) -

The last few months I take images from the camera and are working on a Visual C ++ project to take action Is for To date, it has taken about 65 MSs to update the data, but now it has suddenly increased a lot. What happens: I start my program and before 30 or so iterations show it as expected, then suddenly loop time increases from 250 ms to 65 ms Strange thing, at the time of each task after. I came to know that the part of the code that is causing the recession is quite basic and it has not been modified in a month. The data which goes into it is unchanged and identical to every visit but execution time which is at least 1 ms initially, while the rest of the code is still performing as expected, increases to 170 ms (time Terms). Actually, I am calling the same function more and more, for the first 30 calls, as it should, there is no obvious reason for it. It is also worth noting that it may be a sudden change in execution time, no, gradual increase. What can be done with it

Dependency issue with MSBuild 4.0 when doing DllImport from C# into unmanaged C++ library -

स्पष्ट रूप से VS2010 में असंशोधित C ++ प्रोजेक्ट और C # प्रोजेक्ट के बीच VS2010 में सम्मानित किया गया है, लेकिन MSBuild 4.0 में निर्भरता को अनदेखा कर दिया गया है। < / P> अप्रबंधित C ++ प्रोजेक्ट से सी # प्रोजेक्ट, afaik के संदर्भ को जोड़ना असंभव है। अगर कोई समाधान अप्रबंधित और प्रबंधित परियोजनाओं में है तो मैं सही बिल्ड ऑर्डर कैसे सुनिश्चित कर सकता हूं? MSBuild में एक बग है और समाधान स्तर पर जोड़ा गया परियोजना निर्भरताओं को ठीक से नहीं मानता है। पर एक नज़र डालें और माइक्रोसॉफ्ट द्वारा कनेक्ट पृष्ठ पर एक पोस्टिंग इंगित करता है कि इसका 64-बिट संस्करण MSBuild में एक बग है। यह देखने के लिए 32-बिट संस्करण पर स्विच करने का प्रयास करें कि क्या यह समस्या हल करता है। यदि आप ऐसा नहीं कर सकते हैं, या यह काम नहीं करता है, तो दो अन्य विकल्प हैं उनमें से कोई भी आदर्श नहीं है। पहला विकल्प स्वयं मैन्युअल रूप से एसएलएन फाइल को संपादित करने के लिए होगा और आदेश बदल देगा कि प्रोजेक्ट फाइल में दिखाई देने के लिए आप जिस बिल्ड ऑर्डर चाहते हैं मैं कल्पना करता हूं कि विक्टर का समाधान एक

pop3 - How to read any email account from a domain using C#? -

I think these are two types of questions that are tied together. Read and parse email using POP3 I need to be able to do this, however, I need to be able to work with any email address. I am trying to submit content by emailing users to a specific email address, which will automatically know which account the content should be linked to. Is there a good way to create these email addresses on the fly in C # and check these email accounts for content submissions? Alternatively, there is a way to create an "wildcard" email account that receives all the emails sent to the domain and allows me to see which address was addressed? Most email servers will allow you to route all unchanging emails to a specific mailbox (though this The details of how to do it will depend on the mail server). From there, you should be able to get the address that was sent to the to header of the message.

How can I add entries to an existing zip file in Java? -

संभव डुप्लिकेट: एक ज़िपऑटपुटस्ट्रीम के साथ फ़ाइल को खोलना इसे ओवरराइट करता है। क्या फाइल रखने और बस नई प्रविष्टियां जोड़ना कोई तरीका है? फ़ंक्शन मौजूदा ज़िप फ़ाइल का नाम बदलता है एक अस्थायी फ़ाइल के लिए और फिर नई फ़ाइलों के साथ मौजूदा ज़िप में सभी प्रविष्टियां जोड़ती हैं, ज़िप प्रविष्टियों को छोड़कर जो नई फ़ाइलों में से एक के समान नाम रखती हैं। public static void addFilesToExistingZip (फ़ाइल zipfile, फ़ाइल [] फ़ाइलें) IOException {फेंकता // एक अस्थायी फ़ाइल फ़ाइल tempfile = File.createTempFile (zipFile.getName (), नल) मिलता है, // इसे हटा दें, अन्यथा आप इसे अपने मौजूदा ज़िप का नाम बदल नहीं सकते। tempFile.delete (); बूलियन नाम बदलें ओक = ज़िपफ़ाइल.रेमेनटे (टेम्फफ़ाइल); if (! renameOk) {नई RuntimeException फेंक ( "फ़ाइल का नाम नहीं कर सकता" + zipFile.getAbsolutePath () + "के लिए" + tempFile.getAbsolutePath ()); } बाइट [] buf = नया बाइट [1024]; ज़िप इनपुटस्ट्रीम ज़िन = नया ज़िप इनटस्टस्ट्रीम (नया फ़ाइल इन्पुटस्ट्रीम (टेम्पकेफ़ाइल)); ZipOutputStream आ

Django: Proper place to unregister ModelAdmins -

Sometimes I need to ignore some model admin from the admin site, because I do not want them to be there, like. If I'm using the sites framework, and I do not want to appear in the admin. To do this, call admin.site.unregister (site) In most cases I have put it in the admin.py of some related app But sometimes I put it on a place that does nothing with the original app; Another possibility is making a "dummy app" and it will be put there ... does anyone know more original location where these calls can live? You can add it to urls.py or anywhere < Code> admin.autodiscover () .