Posts

Showing posts from June, 2011

android - Java MySQL and JFrame connection "Cannot convert from boolean to connection" -

public class bancodedados { static string url = "jdbc:mysql://localhost:3306/estoque"; static string pass = "admin"; static string user = "admin"; static connection conexao = null; public static boolean conecta() throws classnotfoundexception { try { class.forname("mysql.driver"); conexao = drivermanager.getconnection(url, user, pass); //system.out.println("conectado."); joptionpane.showmessagedialog(null, "conectado com sucesso!"); return true; } catch (sqlexception e) { joptionpane.showmessagedialog(null, "usuário e/ou senha estão incorretos!"); //system.out.println("usuário e/ou senha estão errados."); return false; } } public class telaprincipal extends jframe { connection conexao = null; preparedstatement pst = null; resultset rs = null; private jpanel contentpane; private jtextfield textlogin; private jpasswordf

java - Generic Doubly Linked List -

for personal practice trying make basic, generic doubly linked list , want know if methods addtohead() , addtotail() made correct , efficient , if not better? , how remove list methods removingdataat(), removingfromtail(), removingfromhead()? node class: public class practicenode<t> { private t data; private practicenode<t> next; private practicenode<t> prev; practicenode() { next = null; prev = null; data = null; } pratcicenode(t data) { this(data, null, null); } practicenode(t data, practicenode<t> next, practicenode<t> prev) { this.data = data; this.next = next; this.prev = prev; } public void setnextnode(practicenode<t> next) { this.next = next; } public void setprevnode(practicenode<t> prev) { this.prev = prev; } public void setdata(t data) { this.data = data; } public practicenode<t> getnextnode() { return next; } public practicenode<t> getprevnode() { return prev;

asp.net - Unable to publish to Azure after 2014 update -

i have aps.net mvc project have been publishing azure while. change laptop , moved sql server 2014. when try publish 3 errors. fist 1 looks root course: error 3 .net sqlclient data provider: msg 2812, level 16, state 62, line 1 not find stored procedure 'sp_addextendedproperty' the other 2 errors are: error 4 script execution error. executed script: execute sp_addextendedproperty @name = n'ms_diagrampane1', @value = n'[0e232ff0-b466-11cf-a24f-00aa00a3efff, 1.00] begin designproperties = begin paneconfigurations = begin paneconfiguration = 0 numpanes = 4 configuration = "(h (1[40] 4[20] 2[20] 3) )" end begin paneconfiguration = 1 numpanes = 3 configuration = "(h (1 [50] 4 [25] 3))" end begin paneconfiguration = 2 numpanes = 3 configuration = "(h (1 [50] 2 [25] 3))" end begin paneconfiguration = 3 numpanes = 3

xcode - Why am I getting three dots in Auto Layout? -

Image
i tried doing auto layout keep on getting 3 dots. how fix this? screen shot of how looks below. just pinned both edges 0 max width label regarding screen sizes...and still content long displays 3 dots per option truncate tail...for have make font size bit smaller or make multiline label...

arrays - How to search the highest value with Java -

i have writtin below code search highest value in 1 dimensional array. it's not working due error. below code: import java.io.*; public class thehigest{ int max = 0; int[] value = new int[5]; bufferedreader objinput = new bufferedreader(new inputstreamreader(system.in)); public static void main(string[]args){ thehigest obj6 = new thehigest(); obj6.input(); } void input(){ try{ for(int i=0;i<=4;i++){ system.out.println("==========================="); system.out.print("value input-"+(i+1)); value[i]= integer.parseint(objinput.readline()); system.out.println("==========================="); } } catch(exception e){ system.out.println("error "+ e); } } } you have not yet implemented functionality searching highes

java - Grails 3.0.2 missing generate-views -

i'm new grails , i'm trying first helloworld it. can generate controller, can't create view because isn't listed in grails (3.0.2) list of command. because ide support grails 3.*, can't create method. in official documentation, commande generate-views listed, can't find anyware. tried on several computer grails 3.0, 3.0.1 , 3.0.2. got same thing each time. the reason dynamic scaffolding not yet implemented in grails 3.x.

javascript - Ajax form submitting to two scripts -

basically have single form want pass variables 2 separate php scripts processing on submit. have done works seems work fine purposes, i'm wondering if there way inside of 1 jquery script instead of having repeat script , changing url have done. or way iv gone fine? cant find many examples of usage on google maybe i'm not searching right things. if i'm doing bad practice please let me know, i'm new ajax , every tutorial follow seems things differently. <script> $(document).ready(function(){ $('#sform').submit(function(){ // show loading $('#response').html("<b>loading response...</b>"); /* * 'post_receiver.php' - pass form data * $(this).serialize() - read form data * function(data){... - data contains response post_receiver.php */ $.ajax({ type: 'post', url: 'move_to_lease.php', data: $(t

Append to File Using Subprocess in Python -

how append file without opening using linux echo command? i've tried sort of possibilities unable achieve result. i'm not sure i'm missing. documentation said type out exact command when shell set 'true' (yes security risk) . echo command works when type in linux terminal not through subprocess. don't see "test.txt" 'this test string.' >>> string = 'this test string.' >>> cmd = 'echo \"' + string + '\" >> test.txt' >>> cmd 'echo "this test string." >> test.txt' >>> >>> subprocess.check_call (cmd, shell = true) 0 >>> >>> subprocess.call (['echo', '\"', string, '\"', ' >> ', ' test.txt']) 0 >>> you're passing redirector ">>" argument echo, it's not argument, it's part of shell. you'll need run shel

c# - Using ASP.net help pages with regular controllers -

i've used asp.net pages create pretty dope api. of api controllers in sub folder called api under controllers. routes api controllers are: api/admin/{controller}/{id} and api/{placeholder}/{controller}/{id} i want create documentation regular mvc controllers (not api controllers). i've googled around quite bit , tried adding route controllers in routes webapi. didn't work. my questions: is there tool similar asp.net pages can auto generate documentation regular controllers? is there way expand asp.net pages include support regular controllers.? danke.

And operator of two sets in MongoDB for Laravel using Jenssegers -

i'm trying mimick mongodb query in laravel using jenssegers eloquent model. the query one: db.getcollection('users').find({ $and : [ {$or : [ { "user.gender" : "male"}, {"user.location" : "nyc"} ]}, {$and : [ {"user.name" : "user name"}, {"user.id" : "10143224362247922"} ]} ] }) it , of 2 sets, being first set being or of values while second set being , of values. i'm using following query: $query = array( '$and' => array( '$or' => array( "user.gender" => "male", "user.location" => "nyc", ), '$and' => array( "user.name" => "user name", "user.id" => "10143224362247922", ), ) ); $cursor = user::raw()->find($query, array( &

httprequest - Http Request with adding sql query android -

i want http request below link in android. have tried various ways add sql query url can't make happen. i think problem '*' (star) in url. <https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22msft%22)&format=json&env=store%3a%2f%2fdatatables.org%2falltableswithkeys>? httpclient httpclient = new defaulthttpclient(); httpresponse response = null; try { response = httpclient.execute(new httpget("https://query.yahooapis.com/v1/public/yql?q=select * yahoo.finance.quotes symbol in (\"msft\")&format=json&env=store://datatables.org/alltableswithkeys")); } catch (ioexception e) { e.printstacktrace(); } statusline statusline = response.getstatusline(); if(statusline.getstatuscode() == httpstatus.sc_ok){ bytearrayoutputstream out = new bytearrayoutputstream(); try { response.getentity().writeto(out);

python - Why is Button parameter “command” executed when declared? -

my code is: from tkinter import * admin = tk() def button(an): print print 'het' b = button(admin, text='as', command=button('hey')) b.pack() mainloop() the button doesn't work, prints 'hey' , 'het' once without command, , then, when press button nothing happens. the command option takes reference function, fancy way of saying need pass name of function. when button('hey') calling function button , and result of being given command option . to pass reference must use name only, without using parenthesis or arguments. example: b = button(... command = button) if want pass parameter such "hey" must use little code: you can create intermediate function can called without argument , calls button function, you can use lambda create referred anonymous function . in every way it's function except doesn't have name. when call lambda command returns reference created function, means

python - Best way to display series of matplotlib plots in browser -

i still familiarizing myself library , interested in displaying series of figures in webpage or saving them format can save , output webpage. best way this? plots = [] row in dataframe: x-values = row[1] #series of x values y-values = row[2] #series of y values = plt.figure() plt.plot(x-values, y-values) plots.append(a) #display array of plots in browser

ios - How to use FBSDKCoreKit to post image to users Facebook -

so totally lost on how post image users timeline fbsdkcorekit. hoping similar twitter coded so: how can share image status did twitter? don't want have user have dialog slcomposeviewcontroller. want happen in background uiimage provide status text provide. twitter.sharedinstance().loginwithcompletion { let struploadurl = "https://upload.twitter.com/1.1/media/upload.json" let strstatusurl = "https://api.twitter.com/1.1/statuses/update.json" uiapplication.sharedapplication().networkactivityindicatorvisible = true var twapiclient = twitter.sharedinstance().apiclient var error: nserror? var parameters:dictionary = dictionary<string, string>() var imagedata : nsdata = uiimagejpegrepresentation(self.image!, 0.5) parameters["media"] = imagedata.base64encodedstringwithoptions(nil) var twuploadrequest = twapiclient.urlrequestwithmethod("post", url: struploadurl, parameters:

Django - Invalid block tag: 'csrf_tokan', expected 'endblock' -

i cannot understand why django app not understand template tags. error: invalid block tag: 'csrf_tokan', expected 'endblock' urls.py: urlpatterns = patterns('', url(r'^index/', 'myproj.views.index'), url(r'^admin/', include(admin.site.urls)), ) views.py: @staff_member_required def index(request): return render(request, 'index.html', locals()) index.html: {% extends "admin/base.html" %} {% block content %} {% csrf_tokan %} {% endblock %} any ideas? you need do: {% extends "admin/base.html" %} {% block content %} {% csrf_token %} {% endblock %}

javascript - How to wait rendering before acting on click event? -

this issue not shows up. works fine if wait time page load or, if wait enough between clicks change language on drop-down menu. simple multi-language website. my drop-down in nav-bar looks like: .... <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <img src="pictures/br-us-sp.png"><b class="caret"></b></a> <ul class="dropdown-menu" id="langmenu"> <li><a href="#" id="pt-br" name="pt-br" value="pt-br"><img src="/pictures/1383607461_brazil.png"></a></li> <li><a href="#" id="en" name="en" value="en"><img src="/pictures/1383615303_united-states.png"></a></li> <li><a href="#"

java - Concatenate variable argument list -

i want prepend string variable list of string arguments. public string mymethod(string... args) { return myothermethod("some string" + args); } now, of course not work, because cannot add these 2 types such. how can insert string @ beginning of list , call myothermethod() ? edit: myothermethod() takes string... argument. limited java 7. there isn't way around creating new string[] , so: public string mymethod(string... args) { string[] concatenatedarray = new string[args.length + 1]; concatenatedarray[0] = "other string"; (int = 0; < args.length; i++) { // or system.arraycopy... concatenatedarray[i + 1] = args[i]; } return myothermethod(concatenatedarray); } or, if third-party libraries allowed, using guava write return myothermethod(objectarrays.concat("other string", args));

geolocation - Check location in background using cordova -

i want check user location in background. example, everyday @ 9am. possible schedule in cordova? you need use services in android. run in background can killed system if consume lots of memory. in case should not killed. more information android services

.net - MySQL Trigger Execution Order -

i have table has both after insert , after update trigger on it. if i, both insert records , update records in single command, in order triggers fire? after building test project able answer. triggers fired in order in rows in table. if had table after insert, after update, , after delete triggers, fire in order rows triggering them in. tested in mysql 5.6. here requested sample public function updatetriggerrecords(byval dt datatable) boolean try return performupdate(dt, setuptriggerrecords_update(), setuptriggerrecords_insert(), setuptriggerrecords_delete(), false) catch ex exception throw ex end try end function private function setuptriggerrecords_update() mysqlcommand dim cmd new mysqlcommand("update tbltriggerrecords set strdescription=@strdescription, inttestingvalue=@inttestingvalue " & _ "where idtriggerrecords=@idtriggerrecords") createtriggerrecordsparameters(c

Insert text into a jQuery object of table cells at certain index -

is following possible accomplish? given string of table cells: var str = "<td></td><td></td><td></td>"; is possible convert string jquery object , add text table cell index: var index = 1; $(str).eq(index).text("some text"); and after convert object string concatenate rest of table cells in existing table. the code above not seem work. there way this? thanks. to convert string, try: var str = "<td></td><td></td><td></td>"; var $celts = $(str); $cells.eq(1).text("some text"); str = $('<div></div>').append($cells).html(); but should able accomplish want without converting string.

glsl - Shadow not rendered correctly -

shadow map http://i59.tinypic.com/16k5bv4.png i trying create shadow using shadow maps. believe shadow map rendered well. it seems sphere's shadow not in correct place, how go fixing that? why there black ring around sphere , how eliminate it? in shadow map vertex shader gl_position = u_depthmatrix * worldcoord; in shadow map fragment shader fragmentdepth = gl_fragcoord.z; vs.glsl uniform mat4 u_model; uniform mat4 u_view; uniform mat4 u_persp; uniform mat4 u_invtrans; uniform vec3 u_lightcolor; uniform vec3 u_lightdirection; uniform vec3 u_eyepos; uniform mat4 u_depthbiasmatrix; in vec3 position; in vec3 normal; in vec2 texcoord; out vec3 v_normal; out vec2 v_texcoord; out vec3 v_position; out vec3 v_positionmc; out vec4 shadowcoord; void main(void) { v_normal = (u_invtrans*vec4(normal,0.0)).xyz; vec4 world = u_model * vec4(position, 1.0); vec4 cameracoord = u_view * world; v_position = cameracoord.xyz; shadowcoord = u_depthbiasmatrix

html - Empty space after unordered list item -

there unwanted space after unordered list shown in ie , firefox in last html <li> item can't removed reducing ul width. have idea how remove space? thanks. #menubar { width:249px; margin:0 auto; list-style:none; border:1px solid grey; border-radius:3px; margin-top:5px; padding:0; height:26px; } .toggle { margin:0; line-height:16px; float:left; border-right: 1px solid grey; padding:5px 8px 5px 8px; } .selected { background-color:grey; } <body> <ul id="menubar"> <li class="toggle selected">html</li> <li class="toggle">html</li> <li class="toggle">html</li> <li class="toggle selected" style="border-right:none;">html</li> </ul> </body> don’t specify fixed width on ul , make display inline-block instead. (and if need horizontally centered, use

ios - The count in my For loop is not incrementing -

when running code, getting number of 1's printing console rather 1,2,3,4,5.... some why happening great, i'm having trouble figuring out. the idea loop through calendar names until finding 'travel' calendar. func checkcalendarexists(){ var eventcalendars = store.calendarsforentitytype(ekentitytypeevent) [ekcalendar] in eventcalendars { var count = 0 var calendarcount = eventcalendars.count if i.title != "travel" && count != calendarcount { ++count println(count) } else if i.title == "travel" { // } else { amethod() } } } your count variable not being incremented because declared inside loop , initialized value 0 @ beginning of each iteration. code work expected have move var count = 0 outside loop.

Gulp: How to concat bower components after all libs been download? -

i'm using "gulp-bower" auto install libs bower.json, want gulp minify libs once it's been download. code: var gulp = require('gulp'); var sass = require('gulp-sass'); var concat = require('gulp-concat'); var bower = require('gulp-bower'); var mainbowerfiles = require('main-bower-files'); gulp.task('bower', function() { return bower() .pipe(gulp.dest("./bower_components")) }); gulp.task('minifybower', function() { return gulp.src(mainbowerfiles()) .pipe(concat('lib.js')) .pipe(gulp.dest('dist')) }); gulp.task('default', ['bower','minifybower']); if run got error. starting 'bower'... [11:23:06] using cwd: /users/yizhou/documents/yi [11:23:06] using bower dir: ./bower_components [11:23:06] starting 'minifybower'... [11:23:06] 'minifybower' errored after 1.53 ms [11:23:06] error: bower components

node.js - S3 upload sending events is working locally with deferred.notify() but not on server -

i sending object s3 upload , locally 'httpuploadprogress' event. notifies .progress call on function , updates record progress. works fine locally not on server. ideas appreciated. i've included 2 snippets of code. i'm using google servers, not sure if it's issue code or server settings :/ s3.uploadvideo = function (filepath, videoname, publisher_id) { var deferred = q.defer(); var body = fs.createreadstream(filepath); var s3obj = new aws.s3({ params: { bucket: transcodeconfig.nontranscodedvideobucket, key: publisher_id + '/' + videoname } }); s3obj.upload({body: body}). on('httpuploadprogress', function (evt) { deferred.notify(evt); return }). send(function (err, data) { if (!err) { deferred.resolve(data); return } else { deferred.reject(err); return } }); //deferred.resolve({}) return deferred.promise; } aws_api.s3.uploadvideo(file.path, filename,

publish - Publishing Lightswitch localy -

Image
i'm trying publish ligthswitch on local network visualstudio 2013, i have installed iis , launched web-deployment services. think installed possible features web platform installer. when publish lightswitch app screen. , dont know how pass service url line. whenever type localhost or computer name server name, perhaps? error "lightswitch must run administrative privileges deploy local host. i fugured use import settings file. alternative way. but how create xml file. i've answered before. may have missed step: open iis locate "default web site" right click , find deploy -> configure web deploy publishing... (this step create xml file can use import settings... (if menu option isn't available means haven't got management service installed. and/or haven't got of web deploy 3.5 components installed.)

java - Generate report of all the information in a Web Application -

i working on web application sells product users. create count of times user buys product or when user clicks on product , doesn't buy it. want generate daily, monthly , annual report of data analyze data. how should approach problem?. there tools or third party applications can use generate these reports? assuming have database users web application, keep track of purchased , viewed items in database (and date these occurred). to retrieve reports, need run aggregate query on database range of time looking for. report can exported database looking in csv format or excel.

How do I match a date from a list of dates in Excel? -

i need compare 2 dates see if equal list of dates in column. eg. sheet 1 column date 1 date 2 date 3 date 4 sheet 2 : row f: date 5 i want see if date 5 equal of dates in column , return true. please me this. an alternative approach: assume date1-date4 in a2:a5 , , date5 in b2 : {=or(b2=a2:a5)} note need enter formula array formula using ctrl + shift + enter .

c - Assigning memory dynamically or on the stack based on a condition (if statement) -

i have c program in array of floats has elements accessed quite duration of program. size of array depends on argument user input , therefore vary. generally, size small enough (~ 125 elements) memory of array can placed on stack , allocation , accessing faster. in rare cases, array may large enough such requires dynamic allocation. initial solution following: if(size < threshold){ float average[size]; } else{ float *average; average = (float*)malloc(sizeof(float) * size ); } // stuff average this gives error @ compile time. how 1 address such problem? the declaration of average has limited lifetime in code; lives end of block. in other words, way declare average makes available inside if/else block. i suggest splitting in 2 functions: 1 handles allocation; other work. this: void do_average(int size, int threshold) { if (size < threshold) { float avg[size]; average(size, avg); } else { float *avg = malloc(s

arrays - Javascript: How do I create a function that can generate an X amount of objects drawing from fixed amount of classes? -

for coding assignment, i'm tasked creating function can generate x amount of objects drawing fixed amount of classes. while objects being generated, store objects in array. how go doing in javascript? pretty same 2 objects. use length of array pick random element, , use loop perform action x times: /* class definitions */ function animal(){ var = document.createelement('div'); a.classname = 'animal'; return a} function horse(){ var = new animal(); a.classname += ' horse'; return } function pig(){ var = new animal(); a.classname += ' pig'; return } function rat(){ var = new animal(); a.classname += ' rat'; return } /* variable definitions */ var animals = ['horse', 'pig', 'rat'], output = document.getelementbyid('output'), numberofdraws = 5, res = []; /* auxiliary functions */ // returns random element given array function pickrandom(arr){ return arr[ math.floo

php - search for a phrase in Sphinx -

i'm not able search phrase in sphinx 2.2.9 using extended syntax. in php, example, i'd use code sounds this: <?php require ("sphinxapi.php"); $cl = new sphinxclient (); $cl->setserver("127.0.0.1", 9312); // $cl->setmatchmode (sph_match_phrase); can't use! deprecated in version 2.2.9 $morethanaword = "to or not be"; // smart code... echo "ok, in " . $docs . " docs phrase " . $morethanaword . " present " . $hits . "times."; ?> $res = $cl->query("\"$morethanaword\"", 'index_name'); $docs = $res['total_found']; can't $hits. sphinx doesnt tell how many times phrase occurs (in cases in document multiple times) - number of matching documents.

Birt: how to run JavaScripts -

so have script run dynamically format report. don't know it. place .js file , how tell birt run script after design phase? i have found resources on can scripts none of them go on how use them in birt. of them talk resource folder don't know resource folder should go. can me figure out? lot. running birt 4.2.2 p.s. oh , no report designer stuff. working in java not designer. we figgured out. have add data.setonrender(jsstr); when constructing report. for (int = 0; < cols.size(); i++) { cellhandle cell = (cellhandle) tabledetail.getcells().get(i); dataitemhandle data = designfactory.newdataitem("data_" + cols.get(i)); data.setresultsetcolumn(cols.get(i)); cell.getcontent().add(data); string jsstr = "javascript goes here."; data.setonrender(jsstr); }

cpan install RPC::XML error for Strawberry Perl -

when try install rpc::xml module strawberry perl v 5.20.2 windows 64 bit, following errors....can shed light issue may be? have installed xml::rpc module. (this worked fine strawberry perl v 5.12) c:\users\administrator.jgordon>cpan install rpc::xml cpan: cpan::sqlite loaded ok (v0.204) database generated on thu, 18 jun 2015 16:48:26 gmt running install module 'rpc::xml' cpan: digest::sha loaded ok (v5.95) cpan: compress::zlib loaded ok (v2.068) checksum c:\strawb~1\cpan\sources\authors\id\r\rj\rjray\rpc-xml-0.79.tar.gz ok cpan: archive::tar loaded ok (v2.04) cpan: file::temp loaded ok (v0.2304) cpan: yaml::xs loaded ok (v0.59) cpan: parse::cpan::meta loaded ok (v1.4414) cpan: cpan::meta loaded ok (v2.143240) cpan: module::corelist loaded ok (v5.20150220) configuring r/rj/rjray/rpc-xml-0.79.tar.gz makefile.pl checking if kit complete... looks generating dmake-style makefile writing makefile rpc::xml writing mymeta.yml , mymeta.json rjray/rpc-xml-0.79.tar.gz c:\str

routes - Rails - SEO friendly URLs with Self joined models -

right there 2 models: category , product. categories self joining make sub_categories. category has_many product, of course belongs_to category. the question have this: how map routes these resources have seo friendly urls. for example: if user clicks on "lamas" category, clicks on "maintenence" sub-category, , clicks on "lama polish" product. path be: http://lamasareawesome.com/categories/1/categories/26/products/11 what want is: http://lamasareawesome.com/lamas/maintenence/lama-polish so far im not having luck trimming controller name out of path, , replacing model attribute. creating routes use attribute id pretty trivial. friendlyid great out of box solution urls like: /categories/lamas/categories/maintenance/products/lama-polish creating url's such lamas/maintenence/lama-polish possible difficult since not conventional , there many potential pitfalls. you example start out with: resources :categories, path: '/

iphone - Looking for the hangouts custom URL scheme on IOS -

i have iphone app receives phone number externally , pops phone dialer number loaded dial. however, alertview phone pop gives user ability select mobile carrier, facetime , skype. add google hangouts option list don't know how call properly. i need able invoke hangouts app programmatically own ios app , pass phone number dial. know can invoke using custom url com.google.hangouts:// don't know how pass phone number hangouts place phone call voip app opens , user has retype number make call. the complete list of parameters can pass app via custom url scheme great , if there callback function.

django - Signal for M2M changed on a through field -

before switching m2m field through field had signal call methods on instance update of values. switched 'through' type m2m , stopped functioning. have work around calling functions in serializer, kind of nasty. how fix it? signal @receiver(m2m_changed, sender=order.items.through) def update_order_when_items_changed(sender, instance, **kwargs): instance.set_weight() instance.set_total_price() instance.save() current models class orderitem(models.model): order = models.foreignkey('main.order') item = models.foreignkey('main.item') quantity = models.integerfield(default=1) class order(models.model): user = models.foreignkey("main.shopuser") items = models.manytomanyfield("main.item", through='main.orderitem') placed = models.booleanfield(default=false) date_placed = models.datetimefield(null=true, blank=true) i feel silly not figuring out before. instead of m2m_changed signal

mysql - Converting outer join from Sybase to My Sql -

can me converting joins in sql.. select distinct b.gl_acct_type + '0', b.gl_id, b.fd_id, b.gl_sub, b.gl_tran, b.gl_entry_type, isnull(b1.gl_amount,0), isnull(b2.gl_amount,0), isnull(b3.gl_amount,0), isnull(b4.gl_amount,0), isnull(b1.gl_debit,0), isnull(b2.gl_debit,0), isnull(b3.gl_debit,0), isnull(b4.gl_debit,0), isnull(b1.gl_credit,0), isnull(b2.gl_credit,0), isnull(b3.gl_credit,0), isnull(b4.gl_credit,0), b.detail_yn zz_cfs_bal_1 b, zz_cfs_bal_2 b1, zz_cfs_bal_2 b2, zz_cfs_bal_2 b3, zz_cfs_bal_2 b4 b.gl_acct_type in ('1', '2', '3') , b.gl_id *= b1.gl_id , b.fd_id *= b1.fd_id , b.gl_entry_type *= b1.gl_entry_type , b1.line_type=1 , b.gl_sub *= b1.gl_sub , b.gl_id *= b2.gl_id , b.fd_id *= b2.fd_id , b.gl_entry_type *= b2.gl_entry_type , b2.line_type=2 , b.gl_sub *= b2.gl_sub , b.gl_id *

php - JSON Bucket for Wordpress with Authentication -

is there wordpress plugin can store json in database , retrieve it? i have wordpress site want use host rather simple, client-side app, needs authentication , place store data. of data each user , of accessed users. it doesn't need wordpress plugin -- simple php script work too, if tie wordpress authentication somehow. i use nodejs, rest of our websites use wordpress, , let me use same theme. i ended using wordpress rest api , advanced custom fields . plugin couples them acf wp api , had modify allow saving changes wordpress, wasn't hard.

jquery - Can javascript for loop starts from negative number? -

here standard for loop: for (i=0; i<=5; i++) { el.append('<span>' + + '</span>'); } this should append 11 spans text -5 5, doesn't work @ all... for (i=-5; i<=5; i++) { el.append('<span>' + + '</span>'); } is possible start i = -5 , example? during creating fiddle found misspell... i+= -5 sorry wasting time :( yes, it's possible, , works fine. for (i=-5; i<=5; i++) { ... } is same thing as i=-5; while (i<=5) { ... } continue { i++ } the point expression allowed inside for 's first part.

ios - UITableView - Row - Multiple alignments -

i trying make row's contents (in uitableview) have multiple alignments: left, center , right. searched stackoverflow solution , found this: different text alignment row in table view . problem solution objectivec-based, having trouble translating swift-based solution. specifically, have uitableview representing active users list. loading contents table view works fine, sake of readability contents - divided 3 types - need visually divided 3 different 'sections'. how go doing this? solution above in swift? in advance. code (for vive) class declaration class mainviewcontroller: uiviewcontroller, uitableviewdatasource, uitableviewdelegate viewdidload() self.activeids.delegate = self self.activeids.datasource = self self.activeids.rowheight = 25 self.activeids.separatorstyle = uitableviewcellseparatorstyle.none self.activeids.allowsmultipleselection = true cellforrowatindexpath func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsind

excel - VBA How do I place HTML in an email that sends through an Access module -

i have vba code has been given me sends email attachment through ms access: sub email_send() dim strto string dim strcc string dim strfrom string dim strsubject string dim strmessage string dim intnrattch integer dim strattachments string dim strattachments2 string dim contact_name string dim email_address string dim cc_address string dim column1 adodb.recordset dim cnndb adodb.connection dim area string dim connection string dim basepath string dim region string dim column2 string dim upc string dim name string dim firstname string dim title string dim surname string dim bold string dim string basepath = "my path" set cnndb = new adodb.connection cnndb .provider = "microsoft.jet.oledb.4.0" .connectionstring = "my connection string" .open end set rstrst = new adodb.recordset rstrst .source = "select [column1], [column2], [column3]" & _ "from table1" rstrst.open , cnndb rstrst.movefirst while not rst

javascript - How do I disable and then re-enable a Hammer Event properly using Hammer.js? -

i'm using hammer.js , jquery.hammer.js in order handle multiple different types of events (mostly tap events). i made wrapper function used any/all tap event listener declarations. function. var onclick = function(button, callbackfunction, turnbackonafterstartcallback) { if(turnbackonafterstartcallback != false) { turnbackonafterstartcallback = true; } if(!button) { logresult("error: attempted create hammer click event listener without assigning jquery object listen too..."); return; } if(!callbackfunction) { logresult("error: attempted create hammer click event listener without assigning callback function..."); return; } $(button).hammer().on("tap", function(event) { var target = event.target; // disable button can't spam event.... $(target).hammer().off("tap"); // receive event object, incase need it...

How do I remove vertical lines from stem() and combine plot()? -

so got sample code. x = linspace(0,1,5); y = x.^2 + 8*x; u = [2,1,3,9,3]; figure axis([0,10,-100,100]) stem(x,u) plot(x,y) can tell me 1) how remove vertical lines? want make scatter plot 2) how combine curve $$y = x^2 + 8x$$ , scatter plot? having hard time finding correct commands. 3) , equivalent of "axis" stem? in matlab, apparently there command called scatter same parameters. hold on command to figure stem(x,u); hold on; plot(x,y); 3. axis should last thing in plot

regex - Selenium IDE Webscraping - How do I create an Array (Or Multiple outputs) -

i have got grips how multiple "individual" selenium codesnippets webscraping individual values, , i'm happy can extend further. i used piece of software called travelsure used regex scraping, , if found multiple values, place them in array so 1 of travelsure scrapes was <div(.*?)> this outputted (the "()" bit saved), every single div , contents inside div tag. outputted csv on selenium, if ask @ large range, concatenates because assumes want 1 item, example below storetext | css=h1.header-style-e.color-q | tree i want give me output of 8 values in csv example: a,b,c,d,e,f,g,h instead of abcdefgh