Posts

Showing posts from September, 2013

php - error while uploading ci project to cpanel -

Image
i error shown below. tried removing user, kept config/database file username , password empty. then, created user wwwbhak_hajje , kept username , pw in db file respectively.

Divide a list into columns ordered vertically using xslt -

Image
i break-down long list of items columns using xslt 1.0 should ordered vertically. have seen solutions on how horizontal ordering cannot figure out how vertically. here sample input: <list> <item>1</item> <item>2</item> <item>3</item> <item>4</item> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> <item>10</item> <item>11</item> <item>12</item> <item>13</item> <item>14</item> </list> here desired output (3 columns): <table> <tr> <td>1</td> <td>6</td> <td>11</td> </tr> <tr> <td>2</td> <td>7</td> <td>12</td> </tr> <tr> <td>3</td> <td>8</td> <td>13</td> </tr> <tr> <td>4</td> <td>9

javascript - Concatenating a variable as the jQuery val() argument? -

i'm trying set value attribute of input (a hidden input in form) using jquery val() function. idea concatenate name of variable , pass argument function, doesn't work expected. code in question in last line: $(document).ready(function(){ var hash = document.location.hash; var turismossid = "1c0f8e3ec28b09f9487140930a0c0b73"; var comercialessid = "b31150acd348f775785b7c4a7398a3c6"; if (hash === "#turismos") { activatab("turismos"); $('#js-sid').val(turismossid); } else { activatab("comerciales"); $('#js-sid').val(comercialessid); } $('#js-turismos-btn').on('click', function(){ activatab("turismos"); document.location.hash = "turismos"; }); $('#js-comerciales-btn').on('click', function(){ activatab("comerciales"); document.location.hash = "come

c# - Can I render a WPF window with buttons on a touch sensitive screen and read the input? Suggestions? -

i want create wpf window display on touch sensitive screen , window contains 80 buttons. want wpf app recognize tabs on specific buttons. need specific api or how tabs on touch sensitive screen transmitted wpf app? any suggestions? thanks windows 7 , higher versions have ability receive input multiple touch-sensitive devices. wpf applications can handle touch input other input, such mouse or keyboard, raising events when touch occurs. wpf exposes 2 types of events when touch occurs − touch events , manipulation events. touch events provide raw data each finger on touchscreen , movement. manipulation events interpret input actions. both types of events discussed in section. wpf enables applications respond touch. example, can interact application using 1 or more fingers on touch-sensitive device, such touchscreen walkthrough creates application enables user move, resize, or rotate single object using touch. source msdn : https://msdn.microsoft.com/en-us/library/ee

Unable to access merge field values inside visualforce component in angularJs -

view: <div ng-controller = "clportalregistrationcontroller"> <div ng-repeat="(key, value) in objectapifieldsetmap"> {{key}} {{value}} //this printing correct result <c:fieldsetcomponent objectapiname="'{{key}}'" fieldset="'{{value}}'" cid="'{{key}}'" sectiontitle="section 1" columns="2" textalign="center"></c:fieldsetcomponent> </div> </div> controller: $scope.objectapifieldsetmap = { applications__c: "application_fieldset_one", clcommon__collateral__c: "collateral_fieldset_one" }; now when i'm trying access {{key}},{{value}} inside c:fieldsetcomponent ,its passing string {{key}} , {{value}} , not converted result. how can access values stored inside key, value inside component? posting solution implemented work around. turns out cannot ac

iOS: Open Facebook native app from UIWebView share link -

in ios application, have list of weblinks coming server. when click of it open link in new uiwebview. in link there can facebook share buton or many other social network sharing button. when click on facebook share opens facebook share screen inside same uiwebview want whenever facebook share button pressed link should open native application share thing. how can it? need help you can use facebook sdk ios, facebook developers ,make sure set urlshemes in info.plist or target -> info -> url types, can open native facebook application in own application

javascript - Update belongsTo relationship via native select element -

i have been trying incorporate details of brenna o'brien 's ember conf 2016 talk <select> ing ember patterns project , working simple attributes (in example below names array of strings , model.name attr( "string" ) ): <select onchange={{action (mut model.name) value="target.value"}}> {{#each names |name|}} <option value={{name}} selected={{eq name model.name}}>{{name}}</option> {{/each}} </select> however, when applied belongsto relationship , array of models: controller : import ember 'ember'; export default ember.controller.extend({ titles: null, init(){ this.set( "titles", this.store.peekall( "title" ) ); } }); template : <select onchange={{action (mut model.title) value="target.value"}}> {{#each titles |title|}} <option value={{title}} selected={{eq title.id model.title.id}}> {{title.description}} </option> {{/ea

json - Parsing string to an Object C# -

i trying parse string object here string; string result = {"status":true,"statuscode":"ok","messagelist":[[1,1,"admin@....net","google inc","\/date(1469685360000)\/","seatle","another string"]]} here class; [datacontract] public class login { [datamember] public bool status { get; set; } [datamember] public string statuscode { get; set; } [datamember] public string[] messagelist { get; set; } } here code; login asd = new javascriptserializer().deserialize<login>(result); i new in field, don't have idea how code it the messagelist in json string not array of strings, array of arrays of strings. update messagelist property in class definition public string[][] messagelist { get; set; } [datacontract] public class login { [datamember] public bool status { get; set; } [datamember] pub

hadoop - Stop sqoop from converting datetime to bigint -

recently noticed whenever ingest sql database using sqoop, datetime fields converted bigint (epoch * 1000) instead of string. important note: i'm storing parquet. i have been trying bunch of sqoop flags "--map-column-java" don't want manually define hundreds of columns in thousands of tables. what flag missing prevent sqoop behaviour? it seems sqoop didn't when storing in plain text. instead of letting sqoop arcane magic on tables, decided following: ingest temporary table, stored text. create table (if not exists) temporary table, stored parquet insert overwrite text stored temporary table parquet stored table this allows proper date formatting without hassle (maybe not existing) configuration , settings tweaking in sqoop. the tradoff it's slower

c# - get user information into database in google authentication -

using system; using system.collections.generic; using system.linq; using system.web; using system.web.ui; using system.web.ui.webcontrols; using system.globalization; using system.net; using system.security.cryptography; using system.text; using system.io; using newtonsoft.json; using system.net.http; public partial class _default : system.web.ui.page { protected string googleplus_client_id = "clientid"; protected string googleplus_client_sceret = "id"; protected string googleplus_redirect_url="http://localhost"; // replace redirect url; redirect url developer.google application should match url. protected string parameters; protected void page_load(object sender, eventargs e) { if (session.contents.count > 0) { if (session["loginwith"] != nu

cordova - failed to run 'forcedroid create' for a hybrid android app -

i going through salesforce trailhead "get started hybrid development". now, try create forcedroid hybrid android app command "forcedroid create". e:\temptry>forcedroid create enter application type (native, hybrid_remote, or hybrid_local): hybrid_local enter application name: mytrailhybridlocal enter target directory of app: trailhybridapps enter package name app (com.mycompany.my_app): com.mytrail.hybrid but failed , got error message below. ". should in format x[.y[.ignored]] ) less minimum required version (5.4.0). please update version of cordova. in fact, folder trailhybridapps exists , empty. , cordova v6.3.0. e:\temptry>cordova -v 6.3.0 so, what's wrong? , can now? thanks in advance. in fact, have succeeded in finishing cordova android app acoording guide: https://cordova.apache.org/docs/en/latest/guide/cli/ so, think cordova has no problem , seems question resulted "npm forcedroid". on other hand,

javascript - React Native - catch all touch events but Touchable's are not bubbling -

i've made tooltip , want close on touch event outside tooltip. don't want make opaque view because still want touch work on whatever pressed. i tried wrapping app in touchablewithoutfeedback : <touchablewithoutfeedback onpress={(e) => this.onapptouch(e)}> this works if element pressed isn't touchable , otherwise event seems swallowed , not bubble top level onpress . is there way work or else alternative? thanks. edit: seems limitation of touchables (they swallow gestures) - https://github.com/facebook/react-native/issues/6796 if render tooltip components after touchable background component touchablehighlight preserve touchable tooltip characteristic because of rendering order of components. so have: |tooltip1| |tooltip2| |background touchable| if want hide or shown depending on state: var touchon = (<touchablehighlight>background component</touchablehighlight>) var touchoff = <your other component/> and control st

java - Selenium | Attach already opened browser(IE) to webdriver -

i working on automation of website in need perform action using user a user b needs approve same. by default web-application takes credentials windows login there no login page this. so did was, automated actions user a . perform action user b ,i created .vbs utility calling in java code, utility opens web browser , sign application user b (i used shell scripting in vbs this). have 2 web browser 1 opened webdriver (on performed action user a ) , other has been opened vbs utility(i need perform action on browser) , since second browser not opened webdriver searching way attach webdriver can perform actions on & approve request created user a . additional information: need perform in ie since client requirement. using java selenium. from reading question, believe tackling problem incorrectly. since cannot tell sort of authentication dealing in browser, suppose can show form , http 401, cover general scenarios. if need other example, different way authenticat

c# - What is equivalent to serialPort.ReadExisting() in Windows 10 app? -

Image
i have used serialport class in previous desktop application using following method read response serialport var response = serialport.readexisting(); now implementing same thing in windows 10 app using following method public static async task<string> readasync(cancellationtoken cancellationtoken,datareader datareaderobject) { string response = string.empty; try { var flag = false; task<uint32> loadasynctask; uint readbufferlength = 1024; cancellationtoken.throwifcancellationrequested(); datareaderobject.inputstreamoptions = inputstreamoptions.partial; loadasynctask = datareaderobject.loadasync(readbufferlength).astask(); uint32 bytesread = await loadasynctask; if (bytesread > 0) { byte[] bytes = new byte[bytesread]; datareaderobject

Show/Hide view with animation in android -

i want hide , show view animation after user touches on screen alternatively. have not idea how that. can me, please? i hight of view here int finalheight = listview.getheight(); valueanimator manimator = slideanimator(finalheight, 0); then hide layout valueanimator animator = valueanimator.ofint(start, end); animator.addupdatelistener(new valueanimator.animatorupdatelistener() { @override public void onanimationupdate(valueanimator valueanimator) { // update height int value = (integer) valueanimator.getanimatedvalue(); viewgroup.layoutparams layoutparams = listview .getlayoutparams(); layoutparams.height = value; listview.setlayoutparams(layoutparams); } }); i want same animation here example your hiding animation can this: objectanimator hideanim = objectanimator.offloat(v, "translationy", 0, -v.getheight()); hideanim.setd

angular - routerOnActivate ran but only current instruction returned -

i using angular beta.15, routeronactivate ran but, previous instruction = null export class idvcomponent implements onactivate { routeronactivate( curr: componentinstruction, prev: componentinstruction ) { console.log(arguments); // <- prev = null } } i tried access component component not accessing directly

visual studio - CMAKE build different platform in one solution -

this question has answer here: c# projects in cmake-made vs2010 solution must unloaded/reloaded avoid being skipped 1 answer hello. from cmake i'm generate visual studio(2013) solution x64 generator, , include_external_msproject have win32 platform. when i'm open solution, default, win32 solution excluded build(field build don't checkmark). question, how can set force build win32 project cmake? for example: include_external_msproject(splash ${cmake_source_dir}/splash.vcxproj) screen function have parametrs platform, set default platform. warning external project, must have same number of configuration , platform. exmaple: if main solution have minsizerel win32, external project must have too. include_external_msproject(splash ${cmake_source_dir}/splash.vcxproj platform win32)

android - Error - No suitable constructor found for ArrayAdapter -

i have code in 1 of tabs of android application :- import android.os.bundle; import android.support.v4.app.fragment; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.arrayadapter; import android.widget.autocompletetextview; public class placeholderfragment extends fragment { /** * fragment argument representing section number * fragment. */ private static final string arg_section_number = "section_number"; /** * returns new instance of fragment given section * number. */ public static placeholderfragment newinstance(int sectionnumber) { placeholderfragment fragment = new placeholderfragment(); bundle args = new bundle(); args.putint(arg_section_number, sectionnumber); fragment.setarguments(args); return fragment; } public placeholderfragment() { } @override public view oncreateview(layoutinflater

c# - getting HttpResponseMessage from a Task<HttpResponseMessage> -

inside httpclient using statement need unwrap somewhere httpresponsemessage. using (httpclient client = new httpclient()) { client.defaultrequestheaders.authorization = new authenticationheadervalue("basic", authuser); task<httpresponsemessage> m = client.getasync(url); // httpresponsemessage msg = ??? task.wait(); return task.result; } my question is: how can httpresponsemessage line task<httpresponsemessage> m = client.getasync(url); you should await task: httpresponsemessage m = await client.getasync(url); in order that, calling method needs marked async .

excel vba - Referring to rows and columns difference -

second line leads error. rows , columns differs or system problem? activesheet.usedrange.rows("1:5").select activesheet.usedrange.columns("1:5").select update: best alternative second line? activesheet.usedrange.resize(,5).select

Magento 1: How to assign an attribute to all products? -

i creating attribute , assigning attribute sets. have found new attribute not associated products until mass update on products. is there way automate process? i using following code create attribute , assign attribute sets <?php $installer = $this; $installer->startsetup(); $attr = mage::getresourcemodel('catalog/eav_attribute')->loadbycode('catalog_product', 'new_boolean_attribute'); if (!$attr->getid()) { $attribute = $installer->addattribute('catalog_product', 'new_boolean_attribute', array( 'type' => 'int', 'input' => 'boolean', 'backend' => '', 'frontend' => '', 'label' => 'exclude product rules', 'source' => 'eav/entity_attribute_source_table', 'global' =>

c++ - Google Test Framework: is better to use shadowing or virtual methods? -

in example below, want unit test class a in order verify when a::request called, b::response() called well: class { public: void request() { m_b.response(); } private: b m_b; }; class b { public: void response(); }; in order that, class b has mocked: class mockb : public b { public: mock_method0( response, void()); }; so test contain: class testa : public { ... }; ... expect_call( m_b, response( ) ).times( 1 ); request( ); ... the question is: how "inject" mockb replacement of b m_b ? first tecnique : create shadowb class redirects method call class mockb . requires original code in external binary, not require change in actual code. second tecnique : making b::response virtual changing b m_b std::unique_ptr<b> m_b replace m_b value instance of class mockb during test setup second approach means more code change , i'm not sure pro. the correct way of solving problem second techniq

node.js - after save update attrubutes infinite loop -

in loopback application, using mongodb backend consider have 2 collections a,b. relation a hasone b . in aftersave hook of model have implemented if(isnewinstance) { // when creating have compute data // , create document in b , have update _id of b // updating calling: ctx.instances.updateattributes();// once again call //after save hook , isnewinstance == false, // go in else condition also. } else { // when updating have compute data , create document in b // , have update _id of b } **summary** : when creating new instance of triggering twice because of updateattributes, how can restrict when editing instance should call not on calling updateattributes.. please share ideas. in advance.. if(isnewinstance) { if(ctx.instance.needtoupdate){ process.nexttick(() => { ctx.instance.updateattributes(); }); } } else { }

Powershell: SQL Server Management Studio Script Generator -

Image
i use script generator integrated in microsoft sql server management studio generate import script whole database. i have replacements in script powershell. want automate generation. there way execute script generator tool (and setting options on screenshot - in case 'data only')? or (if isn't possible) can open tool window automatically ps script don't have open management studio, selecting db, ...? i found scripts 'manually' build script file in powershell that's not i'm looking for. thanks!

sql - How add separating blank space in numeric value -

unfortunately couldn't find solutions in docs. i want numbers in specific format, this: 234652.24 --> 234 652.24 42145124 --> 42 145 124 select employee_id, to_char(salary, '??????') "salary employees; you can specify the nls_numeric_chartacters setting part of the to_char() call , , use g , d format model placeholders: with employees (employee_id, salary) ( select 1, 234652.24 dual --> 234 652.24 union select 2, 42145124 dual --> 42 145 124 ) select employee_id, to_char(salary, '999g999g999d99', 'nls_numeric_characters=''. ''') "salary" employees; employee_id salary ----------- --------------- 1 234 652.24 2 42 145 124.00 if don't want trailing zeros in second value can add fm format modifier, removes leading space (which there allow minus sign if there negative values); still leaves trailing period; can use rtrim() rid of that: with emp

vaadin7 - Add sub header row / summarizing row in Vaadin Grid -

Image
is possible add summarizing row vaadin grid? i have grid has header row join columns , give overview @ top. however, add similar headers throughout grid in order mark end of section. appears possible add headers in header section fill head of grid. footers same @ bottom. but if want special row within grid without having create new grid component? 1 visible data separator. depending on need , how complicated app is, can fake (possibly minor) effort. can find below simple example should started. 1) common class use beanitemcontainer display both categories of rows public abstract class row { private string name; private int amount; public row(string name, int amount) { this.name = name; this.amount = amount; } public string getname() { return name; } public void setname(string name) { this.name = name; } public int getamount() { return amount; } public void setamount(int amoun

apache pig - How Do we extract only the DATE portion from datetime datatype column in Pig? -

for ex: bringing hive table column (datetime data type) value in pig , want extract on;y date portion. have tried using todate function. below error information. please me in critical situation. the original value in column "2014-07-29t06:01:33.705-04:00", need out put "2014-07-29" todate(eff_end_ts,'yyyy-mm-dd') delta_column; 2016-07-28 07:07:25,298 [main] error org.apache.pig.tools.grunt.grunt - error 1045: not infer matching function org.apache.pig.builtin.todate multiple or none of them fit. please use explicit cast. assuming column name f1 has timestamp values 2014-07-29t06:01:33.705-04:00, have use getyear(),getmonth,getday , concat required format. b = foreach generate concat( concat( concat((chararray)getyear(f1),'-')), (concat((chararray)getmonth(f1),'-')), (chararray)getday(f1)) day;

c# - Windows Phone ListViewItem stretch to the width of ListView -

i have created 1 listview . in listview binding custom datatemplate . binding custom datatemplate listview . <listview grid.row="1" name="myalerts" background="transparent" visibility="collapsed"> <listview.itemcontainerstyle> <style targettype="listviewitem"> <setter property="horizontalcontentalignment" value="stretch" /> </style> </listview.itemcontainerstyle> <listview.itemtemplate> <datatemplate> <usercontrols:customdatatemplateselector content="{binding}"> <usercontrols:customdatatemplateselector.friendrequest> <datatemplate> <border borderbrush="gray" borderthickness="0,1,0,1" background="transparent" > <grid>

java - Trim Filename to be short enough -

i writing api based gui, in want full filename appear... filename long, , want trim filename leave out few folders needed. example: c:\users\roiex\somefolder\someotherfolder\somefile.someextension should trimmed like c:\...\someotherfolder\somefile.someextension i have variable filename, generated calling file.getabsolutepath() . have method, let's call toolarge(filename) start : string filename = file.getabsolutepath(); while(toolarge(filename)){ filename = trimpath(filename); } render(filename); what should inside trimpath() ? any appreciated a proper regex replaceall() work : public static void main(string[] args) { string s = "c:\\asas\\users\\roiex\\somefolder\\someotherfolder\\somefile.someextension"; system.out.println(s.replaceall("(\\w+:\\\\).*?(\\\\\\w+\\\\\\w+.\\w+)$", "$1...$2")); } o/p : c:\...\someotherfolder\somefile.someextension the above regex selects last starting directory

ruby on rails - Why ExecJS constantly uses 100% CPU? -

i'm using ruby 2.2.4 , rails 4.2.5 , capistrano deploy, after latest commit server uses 100% cpu. used htop , saw command nodejs tmp/execjs use cpu. cpu usage can explain , tell me solution problem, please? thanks. update: this takes 3-4 hours, , problem appear when add gem 'local_time' this bundle list * cfpropertylist (2.3.2) * actionmailer (4.2.5) * actionpack (4.2.5) * actionview (4.2.5) * activejob (4.2.5) * activemodel (4.2.5) * activerecord (4.2.5) * activesupport (4.2.5) * acts-as-taggable-on (3.5.0) * addressable (2.4.0) * arel (6.0.3) * autoprefixer-rails (6.3.6.1) * awesome_print (1.6.1) * axiom-types (0.1.1) * bcrypt (3.1.10) * best_in_place (3.0.3) * bootstrap (4.0.0.alpha3 f6a7b7b) * bootstrap-datepicker-rails (1.6.1.1) * builder (3.2.2) * bundler (1.11.2) * carrierwave (0.10.0) * carrierwave_backgrounder (0.4.2) * certified (1.0.0) * chartkick (2.0.0) * chronic (0.10.2) * chunky_png (1.3.5)

elixir - Ecto - how to make assoc_constraint return the same error as validate_required? -

let's have model post belongs_to category : defmodule myapp.post use myapp.web, :model schema "posts" field :title, :string belongs_to :category, myapp.category end def changeset(model, params) model |> cast(params, [:title, :category_id) |> validate_required([:title, :category_id]) |> assoc_constraint(:category) end end the problem is: if don't pass category_id params, changeset error key is: category_id , on assoc_constraint invalidation (if category isn't exist), have category key. it's little bit contrintuitive me - because problem same - there no category post. how can deal that? the way find after reading through ecto's source give name want in error field assoc_constraint , , override constraint name yourself. default name belongs_to constraint #{table name}_#{column in table}_fkey ( source ). edit: might use foreign_key_constraint if we're passing :name ourselves that's

html - How to align an img and a carousel next to each other, with max-width of 1000px? -

i beginner , i've ran obstacle while trying align img ( #logo ) , carousel ( #my-slider ) - both located in #img-header . under them there navigation bar , under text. site supposed hava max-width of 1000px (the width of img 350px , width of carousel 630px, supposably they're both under 1000px), when trying align them, carousel jumps under logo. if try align carousel navbar , text, float:left works (if change max-width 1060) however, float:right not work @ - moves right, no matter how change max-width. 3, navbar, text , img-header supposed equally wide. img , carousel "agree" in same line if set max-width 1880, makes stick left , not being centered. tried setting max-width 1000 , float logo left , carousel right doesn't work - neither work if float both same side (for example, both float:left; . this how website supposed like- in center. demo of website html: <div id="img-header"> <img id="logo" src="logo/logo

Intellij Scala math functions import -

new intellij idea/scala i'm wondering there shortcut auto import scala packages. example: package test object testclass extends app{ var = pow(22,22) println("hello world" + ); } it wont compile until import statment added import scala.math._ coming eclipse/java expected crtl + shift o (or auto import) offered me math package, must type import myself ? sometimes yes, no. depends on you're searching for. if write math intellij doesn't know is. if write math. , that's in scope , offer menu of methods on math object. if write date , alt-enter should bring menu of import options. choose 1 , import statement inserted code.

html5 - Arrange data in tables? -

i retrieve data database , tried implement them in table, don't know how arrange them in table. view is: <?php include('inc/header.php');?> <div class="main"> <table> <thead> <tr>id:</tr> <th>name:</th> </thead> <tbody> <tr> <?php foreach ($view $row) :?> <?php $i = 1;?> <?php echo "<td>".$row->audio."</td>";?> <?php echo $i++;?> <?php endforeach;?> </tr> </tbody> </table> </div> <?php include('inc/footer.php');?> i want make place id increase 1 many records , arrange them 1 table. your foreach loop should this <tbody> <?php $i = 1; foreach ($view $row) { echo "<tr>"; echo "<td>".$i."</td>";

openerp - Discount on sale order based on quantity of product in odoo8 -

in products how can give discount based on quantity.ex,suppose if given quantity 3 x , discount 30%.so if customer select product x , quantity 3 in sale order discount should fill 30%. can if existing module present or assistance .

javascript - Change class on multiple img in array -

this first post here, found solutions on page, thank that. i have problem .removeclass , .addclass in last program. load multiple pictures array frames , want change ( previous-image ) ( current-image ) in frames[0] . here code, change class on second image. here code: function loadimage() { // creates new <li> var li = document.createelement("li"); // generates image file name using incremented "loadedimages" variable var imagename = "graphics/img/dodge_viper_srt10_2010_360_720_50-" + (loadedimages + 1) + ".jpg"; var imagename1 = "graphics/img/dodge_viper_srt10_2010_360_720_50-" + (loadedimages + 1) + ".jpg"; /* creates new <img> , sets src attribute point file name generated. hides image applying "previous-image" css class it. image added <li>. */ var image = $('<img>').attr('src', imagename

javascript - How to set onclick event in moving object in canvas? -

how set on click event in moving object in canvas? how move object bottom top in canvas.i newly in javascript going develop sample when page open, objects square , circle randomly come bottom of page , move top automatically. you need establish array have moving objects in it. when onclick handler fires, check see if coordinates of click inside of objects in array. on each animation frame, move objects subtracting of y coordinate each object. //width , height of canvas... var rw = 400; var rh = 500; var coinimage = getcoinimage(); var coinsonscreen = []; var risingspeed = 100; //pixels per second... var coinsize = 75; var lastanimationtime = 0; var howlonguntilnextcoin = 1000; var nextcoinonscreen = 0; function dodraw() { var can = document.getelementbyid("mycanvas"); can.width = rw; can.height = rh; var context = can.getcontext("2d"); //erase canvas context.fillstyle = "#ffffff"; context.fillrect

php - MySQL find umlaute by "oe", "ae", "ue" -

i'm trying build mysql search query. like fine, client wants inputs "oe" find "ö", "ae" find "ä" , "ue" find "ü" it's common in germany. tried using regexp after replacing every occurence of "oe" (oe|ö) regexp strict , doesn't match (for instance) "é" "e". there way make like match "oe|ue|ae" or maybe other way haven't though of? thanks, thomas at character sets , collations supported mysql can spot 2 german collations: latin1_german1_ci latin1_german2_ci it seems latin1_german2_ci 1 want, expects latin1: latin1_german2_ci (phone-book) rules: Ä = ae Ö = oe Ü = ue ß = ss if table/column not using it, can force such collation in query itself, e.g.: mysql> select _latin1'oe' collate latin1_german2_ci ='ö' are_equal; +-----------+ | are_equal | +-----------+ | 1 | +-----------+ 1 row in

ffmpeg No such filter: 'palettegen' in linux -

1. my system uname -a linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 smp tue dec 6 19:48:22 gmt 2011 x86_64 x86_64 x86_64 gnu/linux 2.ffmpeg download http://johnvansickle.com/ffmpeg/ 3.i had download ffmpeg-release-64bit-static.tar.xz ,unpackage file, , run : ./ffmpeg ffmpeg has installed. check using : ffmpeg -version no problems. i run command in system no problem: cd /home/web/tomcat-6.0.29/zhouletest/ffmpeg-3.1.1-64bit-static ./ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -vf fps=10,scale=177:-1:flags=lanczos,palettegen /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png ./ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -i /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png -filter_complex "fps=10,scale=177:-1:flags=lanczos[x];[x][1:v]paletteuse" /home/web/tomcat-6.0.29/zhouletest/gif_images/6.gif but when invoke command in java, errors happend, why? string cmd1

java - what is the most efficient way to extract rows from one CSV file using input from another CSV file -

i have 2 csv files input1.txt , input2.txt . need take 1 value input1.txt , search in input2.txt , if found, write entire record input2.txt file. i have written below code , working slow. there more efficient way achieve this? import java.io.*; public class filecompare { private static final eol = system.getproperty("line.separator"); public static void main(string args[]) throws ioexception { filereader in = null; filereader comp = null; filewriter out = null; filewriter out2 = null; try { in = new filereader("input1.txt"); //file containing value search out = new filewriter("matching.txt"); // file write output out2 = new filewriter("notfound.txt"); // file write non matching bufferedreader br = new bufferedreader(in); string p, q; boolean done; // read input file line line