Posts

Showing posts from September, 2014

facebook - Is it okay to configure Parse User with public "get" class-level permission? -

i'm in process of designing data model ios application i'm using parse backend (first time using parse) every user of application has both private data should readable , writable owner of data , public data should readable everyone. i'm considering keeping publicly readable data stored in parse's built in user object , private data in custom object. there downside this? app uses facebook login exclusively and, thus, when user created authdata field populated "facebook: 12345..." is having accessible security problem? in scenario user object (my public data) need "get" not "find" permissions, need readable knows objectid. rules out dumping entire user's table. i've read through documentation , "sensitivity" of each user's authdata wasn't clear. i realize if using traditional username/password scheme problem, facebook login? help/tips appreciated. edit: printed entire user object console on test c...

sql server - "BULK LOAD DATA CONVERSION ERROR for csv file -

i trying import .csv file getting "bulk load data conversion error" last column. file looks like: "123456","123","001","0.00" i have tried below rowterminator: row terminator = "\"\r\n" nothing working. ideas on causing record have error? thanks as per given example below, remove quotes in csv , use terminator "\r\n". always use format xml when doing bulk insert. provides several advantages such validation of data files etc. the format file maps fields of data file columns of table. can use non-xml or xml format file bulk import data when using bcp command or bulk insert or insert or transact-sql command considering input file given you, suppose have table given below : create table mytestformatfiles ( col1 smallint, col2 nvarchar(50), col3 nvarchar(50), col4 nvarchar(50) ); your sample data file follows : 10,field2,field3,field4 15,field2,field3,field4 46,field2,field3,...

php - regex lenght of a list of numbers from a file -

hello want filter numbers file , way know regexp seems returned array empty. here how failed.txt looks like 015-05-12 18:57:11,4, modem1: sending sms (part 1/2) 40747984729 failed, trying time 98 sec. retries: 2. 2015-05-12 19:07:13,4, modem1: sending sms (part 1/2) 40731109381 failed, trying time 98 sec. retries: 2. 2015-05-12 19:14:16,4, modem1: sending sms (part 1/2) 40766368165 failed, trying time 104 sec. retries: 2. 2015-05-12 19:17:31,4, modem1: sending sms (part 1/2) 40755129209 failed, trying time 103 sec. retries: 2. 2015-05-12 19:20:41,4, modem1: sending sms (part 1/2) 40760015914 failed, trying time 103 sec. retries: 2. 2015-05-12 19:23:22,4, modem1: sending sms (part 1/2) 40763297631 failed, trying time 103 sec. retries: 2. 2015-05-12 19:28:52,4, modem1: sending sms (part 1/2) 40769564718 failed, trying time 103 sec. retries: 2. 2015-05-12 19:39:13,4, modem1: sending sms (part 1/2) 40722494529 failed, trying time 99 sec. retries: 2. 2015-05-12 19:44:43,4, modem1: s...

ios - Property Setter and Getter Not able to overwrite -

this question has answer here: error: writable atomic property cannot pair synthesized setter/getter user defined setter/getter 3 answers so have objective-c header file animal class: #import <foundation/foundation.h> @interface animal : nsobject @property nsstring *name; @property nsstring *favoritefood; @property nsstring *sound; @property float weight; -(instancetype) initwithname:(nsstring *) defaultname; -(void) getinfo; -(float) getweightinkg: (float) weightinlbs; -(nsstring *) talktome: (nsstring *) myname; -(int) getsum: (int) num1 nextnumber: (int) num2; @end and reason when try overwrite setter or getter methods @property nsstring *name in implementation file of animal class, not able , gives me warning saying "writable atomic property 'name' cannot pair synthesized getter user defined setter". doing wrong here? becau...

java - How to download video from url and hide/secure this video from other apps and Gallery -

one part of current project downloading videos url saving sdcard. problem of saved videos in sdcard displayed in android gallery page. want "i don't want of saved vidoes in android gallery." create .nomedia file inside folder don't want tracked mediascanner. maybe you'll need rename folder name after creating file, since there bug mediascanner (in versions of android, not sure one) fails forget already-indexed files when encounters .nomedia file.

vb6 - Select a menu item in another application -

i using vb6 try , select menu item in sub menu of third-party application. can id menu item want click not sure how click button in order have related actions run. here code far: hwnd = findwindow(psclassname, vbnullstring) if hwnd > 0 call setforegroundwindow(hwnd) mwnd = getmenu(hwnd) sub_menu = getsubmenu(mwnd, 0) button_id = getmenuitemid(sub_menu, 0) call setfocus(button_id) i error: wrong number of arguments or invalid property assignment i've tried using: call sendmessage(button_id, bm_click, 0, 0) but didn't work either. ideas appreciated! if have id of menu item, can send/post wm_command message parent includes id. example: private const wm_command long = &h111 sendmessage hwnd, wm_command, button_id, byval 0&

Add mailchimp subscriber via javascript alert() (sweetalert) -

i using sweet alert display input popup. want add entered email mailchimp subscriber. i have no problem popup, can me webhook or api call add subscriber? i'm using example input popup: swal({ title: "an input!", text: "write interesting:", type: "input", showcancelbutton: true, closeonconfirm: false, animation: "slide-from-top", inputplaceholder: "write something" }, function(inputvalue){ if (inputvalue === false) return false; if (inputvalue === "") { swal.showinputerror("you need write something!"); return false } swal("nice!", "you wrote: " + inputvalue, "success"); }); thanks, dave hope able solve this, update - here neat way on how this. sweet alert allows callback on input. assuming using jquery in project, can achieved this. swal({ title: "an input!", text: "write interesting:", type: "input", showcancelbutton: tr...

javascript - how to create 3 columns landscape layout -

Image
i'm fighting 3 columns landscape layout i print page 3 same fix columns (unfortunately height not same, pages break down 2 pages) what in landscape is: and i'm getting is: i cannot position should be can advise me solution crap please any advice helpful, or maybe struggling problem , can give god direction please i who's doing not in landscape few days ago , working find i didn't find solution in web now this starting code: <?php include("bd.php"); $print[] = null; if(isset($_get['option1'])) { $print = $_get['option1']; } $integerids = array_map('intval', explode(',', $print)); $usersids = implode(',', $integerids); $requete = "select p.pr_id id, p.pr_nom nom, p.pr_poids poids, p.pr_ingredients ingredients, p.pr_description description, p.pr_valeurs_energetiques valeurs_energetiques, p.pr_valeurs_nutritionnelles valeurs_nutritionnelles, c.ca_nom categorie, sc.sc_nom sous_categ...

java - SAX Parser characters method doesn't collect all content -

i'm using sax parser parse xml , working fine. i have below tag in xml. <value>•certass >> certass</value> here expect ' •certass >> certass ' output. below code returns certass . there issue special chars of value tag? public void characters(char[] buffer, int start, int length) { temp = new string(buffer, start, length); } it not guaranteed characters() method run once inside element . if storing content in string , , characters() method happens run twice, content second run. second time characters method runs overwrite contents of temp variable stored first time. to remedy this, use stringbuilder , append() contents in characters() , process contents in endelement() . example: defaulthandler handler = new defaulthandler() { private stringbuilder stringbuilder; @override public void startelement(string uri, string localname,string qname, attributes attributes) throws saxexception { ...

c# - Best way to handle null properties on a method parameter -

when checking method's parameter, throw argumentnullexception if it's null. see first line in method below. properties on parameter shouldn't null? if try handle them same way, code analysis error: ca2208 instantiate argument exceptions correctly method 'priorityderatingcomponentlogic.createitem(ivsimulation)' passes 'ivsimulation.solarpanel' 'paramname' argument 'argumentnullexception' constructor. replace argument 1 of method's parameter names. note provided parameter name should have exact casing declared on method. public deratingcomponentbase createitem(ivsimulation ivsimulation) { if (ivsimulation == null) { throw new argumentnullexception("ivsimulation"); } if (ivsimulation.solarpanel == null) { throw new argumentnullexception("ivsimulation.solarpanel"); } if (ivsimulation.globalequipment == null) { throw new argumentnullexception("ivsimulation.globalequipment")...

php - Can't get image even if it exist on server - 404 not found? -

even though image embed in code exists in folder in xampp, browser still logs 404 not found. guess permission issues set files mod of 777 , works. however, think not safe. permission need change browser can access image , doesn't allow write , execute? standard chmod web files 644 . allow owner edit/delete, else read.

char - Simple Java Boolean Not Working -

i have following program goes through string. if there space, print nothing. if char uppercase, print 0. if char lowercase, print 1. import java.util.*; public class blah { public static void main (string args[]){ scanner input = new scanner(system.in); string text = input.next(); int i; (i = 0; < text.length(); i++) { if (text.charat(i).equals(" ")) system.out.print(" "); else if (character.isuppercase(text.charat(i))) system.out.print("0"); else { system.out.print("1"); } } } } i following 2 errors: char cannot deferenced cannot fine symbol: method.isuppercase(char) please help. thank you. text.charat(i) returns primitive type char , doesn't have equals method. compare against reference character, use equality operator == . reference character must surrounded single quo...

Powershell and Oracle, exporting SQL data to csv -

i have oracle sql table contains email addresses. need extract data , insert array, , export csv file. i'm not sure go here. code far is: $odpassemblyname = "oracle.dataaccess, version=2.112.3.0, culture=neutral, publickeytoken=89b483f429c47342" [system.reflection.assembly]::load($odpassemblyname) $con = new-object oracle.dataaccess.client.oracleconnection("user id=hr;password=oracle;data source=xe") $cmd=$con.createcommand() $cmd.commandtext= @" select distinct email hr.emails acct_enabled = 'y' , upper(email) not 'ais%'order email "@ $con.open() $rdr=$cmd.executereader() $columnnames=$rdr.getschematable() | select-object -expandproperty columnname $resultset=@() while ($rdr.read()) { $intdata=$rdr.getoraclestring(0) "{0,0}" -f $intdata.value } $con.close() can me while loop (i'm new programming mostly) , me add result set array, , export result set nice little csv file? thanks in advance hel...

android - How can I pull off the circular reveal ripple transition used in all the Material Design videos? -

this video here explains effect trying replicate: http://imgur.com/a/s7x5j#5 i able create circular reveal instructed in documentation have no idea how combine color ripple. is there suggestion on how properly?

uri - Disappearing Intent data -

so have uri in main activity set send intent using [intent_name].setdata(urivar); , time need extract uri in new activity using getintent().getdata() uri becomes null. pass uri's under several circumstances in app , reason 1 object ends null; setting uri intent //add gallery intent mediascanintent = new intent(intent.action_media_scanner_scan_file); mediascanintent.setdata(mmediauri); sendbroadcast(mediascanintent); } //sends uri recipients page intent recipientsintent = new intent(this, recipientsactivity.class); log.i(tag, mmediauri+ ""); recipientsintent.setdata(mmediauri); i run line , logs necessary data there log.i(tag, recipientsintent.getdata() + ""); startactivity(recipientsintent); by time here data's gone. logically there should nothing erasing data right? i'm pulling hair out trying understand. protected void oncreate(bundle savedinstancestate) { super.o...

ruby - Intuit Customer Account Data (CAD) SAML Assertion returning Ambiguous Error Message -

i trying obtain oauth tokens in order use cad api, however, keep getting error: signature on saml token invalid commentary: [verification against static certificate not supported in scenario. since dont have npm or nodejs have started create one, however, getting hung on saml assertion request. far have ported on ruby gem making saml request new oauth token found here: https://github.com/cloocher/aggcat/blob/master/lib/aggcat/base.rb (line 70) def saml_message... my first stab @ not neat, i'm trying verify can make saml request nodejs , response containing oauth token. my source code nodejs script can found at: https://github.com/britztopher/intuit-cad/blob/master/server/saml2.js and intuit documentation making request can found here: intuits cad doc lacking kind of sample of needed produce assertion message. if clarification needed please comment, trying jump first hurdle. ok, after cloning aggcat repo ruby script , modifying template assertion mess...

visual studio 2013 - Nuget keeps adding repositories.config in source control (TFS) regardless of disableSourceControlIntegration flag -

nuget seems stubbornly ignore flag inside .nuget/nuget.config file. it's important note no actual packages being added source control, annoying repositories.config. i can confirm our settings correct, , if remove flag .nuget folder, packages start being added. the reference problem find here - https://github.com/haacked/nuget/pull/2 . seems pull request made in clone repository. for reference using vs 2013 tfs 2013 latest updates. use server workspaces , couldn't make .tfignore file work due that. has experienced problem , if so, how did overcome it? we use .tfignore file this. here's blog on how it: http://blog.appliedis.com/2014/11/06/excluding-files-from-team-foundation-version-control-using-tfignore-files/

Python assert equal except one attribute -

updated thank suggestions, i'm having new issue here. since i'm comparing 2 datetime.datetime objects , didn't realize doesn't have attribute items or keys iterate from, valid answers provided below no longer work. i'm refactoring dummy data here better reflect use cases, # 2 datetime want assert equal long equal 'second' = datetime.datetime(2015, 7, 22, 11, 36, 49, 811000) = datetime.datetime(2015, 7, 22, 11, 36, 49, 811099) assert == # sure return false as can see example, every attribute 'microsecond' equal. anyway loop through attributes , compare? thanks guys! edit: modified question, can use: assert now.replace(microsecond=0) == then.replace(microsecond=0) or assert now.strftime("%y-%m-%d %h:%m:%s") == then.strftime("%y-%m-%d %h:%m:%s") to explicitly exclude attr3 in particular (and ensure value isn't same in each dictionary): assert all([foo[k] == bar[k] k in bar.keys() if k != ...

ruby - When I deploy my rails app to heroku a foreign key disappears -

all code i'm showing below code have cloned heroku. i have relationship in app: schema create_table "spots", id: false, force: :cascade |t| t.string "id", null: false t.integer "bid_cents", null: false t.integer "ask_cents", null: false end create_table "products", id: false, force: :cascade |t| t.string "id", null: false t.string "type", null: false t.text "description", null: false t.decimal "weight", null: false t.string "metal", null: false t.string "spot_id", null: false t.integer "elemetal_capital_premium_cents" t.integer "goldtrex_markup_cents", ...

ios - How can I add a tabbed menu to a carousel view in Xamarin forms? -

i trying implement interface there 5 pages can swiped , dragged between can change page tapping on tabbed bar @ bottom. i writing custom renderer carouselpage can not add tabbed bar @ bottom because ios uitabbar requires , array of uiviewcontrollers switch between , have access pages. this have tried far: [assembly: exportrenderer (typeof (extendedcarouselpage), typeof (extendedcarouselpagerenderer))] namespace customrenderer.ios { public class extendedcarouselpagerenderer : carouselpagerenderer { protected uitabbar tabbar; protected override void onelementchanged (visualelementchangedeventargs e) { base.onelementchanged (e); tabbar = new uitabbar (new cgrect (0, this.view.frame.height * 0.9, this.view.frame.width, this.view.frame.height * 0.1)); tabbar.items = new uitabbaritem[]{ new uitabbaritem("hello",uiimage.fromfile("homeicon.png"),uiimage.fromf...

ios - Swift : How to refactor my code using more elegant approach? -

i wrote piece of code creates array of objects based on array of dictionaries. problem solution, it's written in noob way using multiple loops imperatively. let's consider following case. there class called "drug" class drug { var name:string var dosage:[(dose:string,time:string)] init(name:string){ self.name = name self.dosage = [] } } i obtain data array of dictionaries, here example: var array = [["drugname":"amotaks", "time":"17.00", "dose":"5"], ["drugname":"amotaks", "time":"18.00", "dose":"5"], ["drugname":"amotaks", "time":"18.00", "dose":"5"], ["drugname":"amotaks", "time":"17.00", "dose":"5"], ["drugname":"claritin", "time":"17.00", "dose":"5...

xml - Increment a particular exported HTML tag via XSL -

Image
i trying export xml html information can presented in nice tabular format. part of xsl <xsl:template match="step"> <tr> <xsl:choose> <xsl:when test="starts-with(obj, '▬▬ uc_')"> <td>numbering here</td> <td class="level0"> <xsl:value-of select="obj" disable-output-escaping="no" /> </td> </xsl:when> <xsl:otherwise> <td></td> <td class="level{count(ancestor::*)-3}"> <xsl:value-of select="obj" disable-output-escaping="no" /> </td> </xsl:otherwise> </xsl:choose> <td> <pre> <xsl:value-of select="details" disable-output-escaping=...

c# - .NET 4.6 HttpResponse.PushPromise methods to manage http/2 PUSH_PROMISE header -

i bit confused push promise http/2 header handling in .net4.6 . when look httpresponse.pushpromise there 2 overloads: one accepts path resource public void pushpromise(string path) - assuming resource read , binary sent across client. second public void pushpromise(string path, string method, namevaluecollection headers) accepts sting method , namevaluecollection headers failing understand. why want pass method (assuming httpmethod get, post, etc) , collection of headers inside push promise header? from reading http/2 spec (section 8.2) , here gather: passing method push_promise frames required cacheable , safe . have option of using get , head , 2 http methods defined both safe , cacheable. passing headers since push_promise frames required cacheable, used add specific cache-control directives promise. section 8.2.2 of spec states client has option download promised stream , can refuse it, imagine client if found had up-to-date version of...

ios - the display result of tiled map is wrong (using cocos2d-x 3.6) -

Image
this created in tiledmap editor: but when try display in simulator, becomes this: you can see of tile images missed, wrong(the place dirt.png should become wall.png instead). don't know why happened. follow tutorial , add following code in helloworld project. // create tmx map auto map = tmxtiledmap::create("tile/test.tmx"); addchild(map); the content of test.tmx: <?xml version="1.0" encoding="utf-8"?> <map version="1.0" orientation="orthogonal" renderorder="right-down" width="10" height="10" tilewidth="36" tileheight="36" nextobjectid="5"> <tileset firstgid="1" name="test" tilewidth="36" tileheight="36"> <tile id="0"> <image width="36" height="36" source="dirt.png"/> </tile> <tile id="1"> <image width="36...

php randomly losing array entries -

following sql call, php storing 2d assoc array list of services. i'm splitting 2 different arrays (one services match "friendly" name (i.e; predefined service), , unspecified services. during process, php seems randomly throwing out array entries - before split begins. code: $tmp_results_friendly = array(); $tmp_results_uncategorised = array(); foreach ($results $result) { //var_dump($result); if ((int)$result['friendly_service_id'] != 0) { $tmp_results_friendly[] = $result; } else { $tmp_results_uncategorised[] = $result; } } at point of commented-out var_dump, entries can go missing @ random. var_dump of $result show everything. it's typically services have friendly_id not equal 0 go missing. there no duplicates in array, nor there over-writing of entries in there. var_dump before foreach loop return - seems straight out vanish when e...

javascript - Allow "/" forward slash in regular expression -

var patt = /^(?=.*[a-za-z0-9.!@#&*\-\u0080-\u052f])[a-za-z0-9\s.!@#&*',\-\u0080-\u052f]*$/; console.log(patt.test("\u002f")); i know u002f forward slash in unicode. i've tried adding pattern "/" , haven't been able log true yet. it easy add forward slash, escape it. no need using character references or entities. var patt = /^(?=.*[a-za-z0-9.!@#&*\-\u0080-\u052f])[\/a-za-z0-9\s.!@#&*',\-\u0080-\u052f]*$/; ^ var patt = /^(?=.*[a-za-z0-9.!@#&*\-\u0080-\u052f])[\/a-za-z0-9\s.!@#&*',\-\u0080-\u052f]*$/; alert(patt.test("/test"));

javascript - Conditional OnClick popup will not appear as top window - Dependent on DB & WizardControl textbox value -

Image
windows 7, c# web application, vs 2012, .net 3.5, testing on google chrome. i have wizard control several steps. first step has form user fills out , when click "save & continue >>"(startnavigationtemplate's btnnext), need check what's in textbox txtidno(if listed. textbox may left empty new properties being added first time), run value through database ensure number matches property have listed. if value valid, user should directed next wizard step. if value not valid, there should modal pop-up window informing user id no incorrect, , should not redirected next step. thinking easy task, first tried using messagebox.show() in button's click event, wzdataentry_activestepchanged. the popup message appear when should , unless stepping through code in debug mode, popup appears behind internet window (this tested on chrome, ie, & mozilla firefox). allows user continue edit form, although not redirect next step. problem popup doesn't populate ...

python - no django app created when following the docker-compose tutorial -

i'm following docker-compose tutorial, try , figure out how django app deploy: http://docs.docker.com/compose/django/ and everything's going smoothly (the app works!) django project folder composeexample isn't created in local project directory. i'm left working "it works!" page after running: $ docker-compose run web django-admin.py startproject composeexample . but can't continue edit composeexample/settings.py , tutorial suggests: folder doesn't exist on machine (it exist in container, it's no me there!) is tutorial wrong? did not follow right? thanks! update: here's problem, i'm using docker-machine run whole process through remote docker instance. rules local folder sharing different when using remote docker machine? you need set dockerfile when docker build, copies local code onto container. started, need copy files container local. here that. or overwrite directory own django app copying files host doc...

javascript - gravity forms fire js event on successfull form submission -

is in gravity forms anyhow possible fire javascript event on successful ajax form transmittion? adding html javascript displayed response not seem work eg: <script>console.log("successful-form-transmition");</script> there's event fired upon successful gravity forms submission: gform_confirmation_loaded . can use jquery so: $(document).on("gform_confirmation_loaded", function (e, form_id) { // code run upon successful form submission });

Display data horizontally from MySQL table PHP mysql -

i want make call 2 data in cell how code below im use codes my source code but want insert in every cell email id allso mean 2 data in 1 cell how can that? pls give me solution . u have select both data table example: $sql_result = mysql_query ("select email, id members"); now can fetch result while ($row=mysqli_fetch_row($result)) { ...... } now can data creating function $i++, $row[$i]. echo $row[0]; //first email; echo $row[1]; //first id put both results inside 1 result. care should switch mysqli or pdo mysql no longer supported.

Redim size of array in VBA Excel -

i have problem use function redim preserve in vba excel. i redim array use in macro before without clear data inside. my macro looking : dim table_data variant ... redim table_data(2 * n + 2 * m + 2 * n, table_case.listcolumns.count - 1) ... dim1 = ubound(table_data, 1) dim2 = ubound(table_data, 2) redim preserve table_data(0 dim1 + 2 * n, 0 dim2) do have idea should modify? when using preserve keyword; can change size last dimension. size of other dimensions once declared must remain unaltered. the code below should work: redim preserve table_data(lbound(table_data, 1) ubound(table_data, 1), 0 dim2)

mouseevent - pyqt QGraphicsView mouse events trouble -

i'm writing mdi application qgraphicsview on each tab. add items, move them , there group. there number of problems, such as: a one-time allocation of objects. can not rubber band select objects , holding shift add selection other rubber band selection. can done example if before new allocation remember old objects , add after separation previously. done through mouse events, , not work @ all necessary when click on object action, done through mouse events ... i need mouse wheel zoom, , rests on mouse events possible of these actions have no ready-made solutions zalezaniya in mouse events, lessons find - mouse events save me how make qgraphicsview catch mouse events? import os import sys import sip import maya.openmayaui mui pyqt4.qtcore import * pyqt4.qtgui import * #---------------------------------------------------------------------- def getmayawindow(): ptr = mui.mqtutil.mainwindow() return sip.wrapinstance(long(ptr), qobject) #-----------------------...

vba - clone a recordset which have some attachments -

i wanted copy recordset another. i found code: do while not rs(1).eof ' can place if condition here rs(2).addnew = 0 rs(1).fields.count - 1 rs(2).fields(rs(1).fields(i).name) = rs(1).fields(i).value next rs(2).update rs(1).movenext loop it works problem have attachments fields in recordsets , boucle block on them. have solution?

php - Prepared statement is failing -

i trying create forum. in prepared statement, trying get forum_topic , forum_posts. furthermore in code trying see posts made individual topic, if looking @ topic on here , see posts(comments). i getting correct values $tid , $cid . believe issue has prepare part of this, not sure. else statement... echo "<p>this topic not exist.</p>"; but actual topic , should have post it. does see doing wrong? my full code: error_reporting(e_all); ini_set('display_errors', 1); try { $con = new mysqli("localhost", "", "", ""); if (mysqli_connect_errno()) { throw new exception("connect failed: %s\n", mysqli_connect_error()); exit(); } $cid = $_get['cid']; $tid = $_get['tid']; $userid = ( isset( $_session['user'] ) ? $_session['user'] : "" ); //prepare if ($stmt = $con->prepare("select * forum_topics `category_id`=? , `id`=? limit 1")) { ...

java - Create a new project under an existing projet -

i have question creation of new project under existing project. assume have these 4 projects in eclipse: org.projet.design org.projet.feature org.projet.conf org.projet.tag all project in projet repository. now, need create new java project called org.projet.myproject . problem in eclipse is, when create new project called myproject , choose org.projet default location, projects under org.projet added under org.projet.myproject . so, please how create new java project under existing project ?

wordpress - How to add a file field in single product details page in woocommerce -

i developing print shop kind of website. want users option upload design samples before add cart. i found couple of plugins not pretty sure if there code snippet or plugin available this. however able create text field not sure how manage file input field.

SQL Server: Varchar to Numeric Conversion Error - No Numeric -

i encountering data-conversion error on table-insert , baffled. i'm writing script quick-and-dirty reconciliation of freight costs pre-consolidation , post-consolidation databases. have 2 db tables created importing csv files. keep things simple dba, data csv files go varchar columns in tables - recon scripts handle conversion/casting needed. client on sql server 2008 r2. here abbreviated definitions tables in question: create table [dbo].[nocommit_prod]( [sort_delta_total] [varchar](50) null, [rec_type] [varchar](50) null, [price_id] [varchar](50) null, [quote_id] [varchar](50) null, [shipto_org_id] [varchar](50) null, ... [trace] [varchar](8000) null ) on [primary] create table [dbo].[nocommit_test]( [sort_delta_total] [varchar](50) null, [rec_type] [varchar](50) null, [price_id] [varchar](50) null, [quote_id] [varchar](50) null, [shipto_org_id] [varchar](50) null, ... [trace] [varchar](8000) null ) on [primary] here temp-table definition , insert/select statement tha...

javascript - Codeigniter adds index.php to a download url -

i trying make button when pressed calls javascript function downloads file. download code: function downloadfile(url) { console.log('clicked'); var iframe; iframe = document.getelementbyid("download-container"); if (iframe === null) { iframe = document.createelement('iframe'); iframe.id = "download-container"; iframe.style.visibility = 'hidden'; document.body.appendchild(iframe); } iframe.src = "uploads/img/"+url; } button code: <?php echo '<button type="button" onclick="downloadfile(\''.$value.'\')">'.$value.'</button>' ?> the output is: get http://localhost/dfi/index.php/uploads/img/mux.png 404 (not found) because index.php added url, when remove index.php , access file directly in browser can access normally. try : iframe.src = "/uploads/img/"+url; or add full url src...

ios - how to get current distance between iPhone and paired Apple Watch -

is there way distance between apple watch , paired iphone. working on test case in .. iphone , apple watch should notified when distance between both devices got change. you technically can't exact distance, can make 1 device act beacon , work on core location proximity. have 3 proximity states on can check distance: clproximityimmediate (i.e. device close each other), clproximitynear (i.e. devices close each other) , clproximityfar (i.e. devices lose bluetooth connection).

How to group and assign values of dictionary into single key in python -

i have memory of intel hex file 1879048192: 4, 1879048193: 3, 1879048194: 2, 1879048195: 1, 1879048196: 4, 1879048197: 3, 1879048198: 2, 1879048199: 1, 1879048200: 4, 1879048201: 3, 1879048202: 2, 1879048203: 1, 1879048204: 4, 1879048205: 3, 1879048206: 2, 1879048207: 1, i want have 1879048192: 1234(with swapping), 1879048196 :1234 1879048200 :1234 1879048204 :1234 1879048208 :1234 i using for x in range (0,count): in range(0,4): realdata = mapfile.values()[x:x+4] realdata[x+3],realdata[x+2],realdata[x+1],realdata[x+0] = realdata[x+0],realdata[x+1],realdata[x+2],realdata[x+3] s = ''.join(map(str, realdata)) realadr = mapfile.keys()[x] + offset offset = offset + 4 _buf = {realadr : int(s)} but not able success, new python. please suggest me better implementation. _buf = {realaddr : int(s)} causes _buf dictionary single entry, last values of realaddr: int(s). that's not want. mo...

c# - Linq query to get data from a specific RavenDB collection not working as expected -

so i'm using ravendb database contains 2 different collections store picture objects documents. first collection named pictures, second named deletedpictures. in application for, user can delete picture of themselves. deleted picture object put in second collection deletedpictures. i'm doing changing ravendb document metadata: session.advanced.getmetadatafor(picture)[constants.ravenentityname] = "deletedpictures"; i'm running problems when making queries retrieve documents deletedpictures collection. currently i'm using 2 functions utilise linq queries retrieve picture documents, 1 retrieving deleted pictures; public ienumerable<picture> retrievealldeleted() { var alldeletedpictures = session.query<picture>() .asenumerable() .where(p => session.advanced.getmetadatafor(p) .value<string>(...

Rename a file with github api? -

i thought update file method of github api used rename file (by providing new path parameter) not seem work. the way rename delete file , create similar 1 new name? i thought update file method of github api used rename file (by providing new path parameter) not seem work. there's no way rename file single request api. the way rename delete file , create similar 1 new name? that's 1 way, downside 2 commits in history (one delete, , 1 create). a different way use low-level git api: https://developer.github.com/v3/git/ with that, can modify tree entry containing blob list under different name, create new commit tree, , update branch point new commit. whole process requires more api requests, single commit rename.