Posts

Showing posts from September, 2010

Issue getting the selected slot date in Kendo Scheduler -

i've got kendo scheduler , want simple: select day , selection information. here's scheduler: @(html.kendo().scheduler<myproj.models.scheduleinspectionmodel>() .name("scheduler") .views(views => { views.monthview(mv => mv.selected(true)); views.agendaview(); }) .events(e => e.change("test")) <------------------------ .timezone("etc/utc") .selectable(true) .datasource(d => d .read("getscheduleinspections", "controllername") ) ) the javascript function fired when day selected: function test(e) { alert("hey"); } the function called , alert shown. want able e.date access current date, example. there no intellisense , can't find api documentation follow. to date in change function of scheduler use : var date = e.start; yes, correct intellisense not available this. use can use client side debugging(for exa

css3 - how to hide padding in Bootstrap? -

i trying hide hidden-xs in bootstrap padding. how able remove padding without removing whole row ? in advance! i have this <td class="paddinglefttenhiddenxs col-lg-8" style="padding-left:10px; "> css: div.special > div[class*="col-"] { padding-left: 0; padding-right: 0; } html: <div class="row special"> <div class="col-xs-8"> content... </div> </div> div.special > div[class*="col-"] targets children of special class have class starts "col-" make "col-xs-" target small *edited

java - Service Provider Interface Design for Classification -

i'm trying design spi expose services can create support tickets. of interface straightforward. support tickets have id's, summaries, status, etc. i'm running problem area of classification. simplified example: service provider 1 categorizes tickets follows: type: support category: security/access subcategory: password reset service provider 2 has different paradigm classification: classification: administration folder: corporate/security area: access type: passwords what i'm struggling how create common interface/spi can provide enough information service providers can transform classification structure required system. i assume require type of adapter pattern, there better way?

css - Safari column rendering bug -

Image
safari 7 , 8 seem render title of elements in right column of site ( https://unindented.org/ ) incorrectly: i'm doing following on container: -webkit-column-count: 2; -moz-column-count: 2; column-count: 2; -webkit-column-width: auto; -moz-column-width: auto; column-width: auto; is there workaround bug? you've got 2 options here: remove overflow: hidden header element. remove border-radius property header i wish tell why these work. safari's implementation of webkit bad ie @ times.

user interface - Java - Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException error -

i creating simple game in java. here code. gui class: public class gui extends jframe implements actionlistener{ jbutton upbutton, downbutton, leftbutton, rightbutton; game game; player player; board b; maze maze; player pl; public gui () { b= new board(); game game = new game(b); setsize(800,600); container cp = getcontentpane(); upbutton = new jbutton("up"); downbutton = new jbutton("down"); leftbutton = new jbutton("left"); rightbutton= new jbutton("right"); upbutton.addactionlistener(this); downbutton.addactionlistener(this); leftbutton.addactionlistener(this); rightbutton.addactionlistener(this); jpanel p = new jpanel(); boxlayout boxlayout1 = new boxlayout(p, boxlayout.y_axis); p.setborder(borderfactory.createemptyborder(250, 0, 250, 0)); p.setlayout(boxlayout1); jpanel panel_1 = new jpanel(); p.add(panel_1, borderlayout.north); jpanel panel_2 = ne

javascript - How can I create a simple page vertical scroll bar without using jQuery? -

Image
i have looked @ think scrollbars code have not yet been able find simple 1 not use jquery or complex library. has created there own simple scrollbar using javascript? looking example of how can done. in particular have simple bootstrap web page with: <body> <header> ....</header> <main> ......</main> </body> what able have small in page scroll bar appear right of area if content there larger fit on single page. styling purposes not browser default scroll bar. here's example of looking 1 use jquery cannot use on site: http://manos.malihu.gr/repository/custom-scrollbar/demo/examples/complete_examples.html i looking way using javascript in modern browser ie9 , above . think useful many people have opened bounty of 200 in hope provide example of draggable page scrollbar respond mousewheel when on page content area. just update. not looking mobile solution this. looking solution work inside pc / mac browser. site not set or s

ida - Debugging malicious program -

i have malicious .scr file heard steals gaming account items. there way debug .scr file in safe environment without executing it. opened in ida pro did not find useful. any pointers regarding debugging process highly appreciable. analysis of malware risky. if committed @ least need linux host windows guest on sacrificial computer doesn't have wireless card , unplugged internet. malware has mechanism detect jail. common vms use standard drivers , checking if running in jail easy. if in jail nothing 1 line of code. make matters worse, decent malware has mechanism jailbreak vm , infect host windows. don't mention sandboxie. last, not least - malware starts revenging if try decompile it. so, instead of stolen game password might have big mess. so, if have sacrificial computer , free time, go ahead. carefully.

java - how can I convert an Object to a string? -

i want take list user's choice , convert string jbox. how can convert contents string can use it? public class graph extends jframe { private string temp; public graph() { } public void createbox(string[] a) { jframe frame = new jframe(); frame.setdefaultcloseoperation(jframe.exit_on_close); jbutton jbutton1 = new jbutton("ok"); final jlist jlist1 = new jlist(a); jbutton1.addactionlistener(new java.awt.event.actionlistener() { public void actionperformed(actionevent e) { object contents = jlist1.getselectedvalue(); //system.out.println(contents); setchoise((string)contents);//how can convert string ? } }); jbutton jbutton2 = new jbutton("close"); jbutton2.addactionlistener(new actionlistener() { public void actionperformed(actionevent e) {

authentication - AWS Cognito : Unable to construct an endpoint for cognito-identity in region None -

i use aws cognito cli command syntactically exact aws cognito-identity get-open-id-token-for-developer-identity --identity-pool-id eu-west-1:c1b83398-09xx-4x38-b10x-2346x1xdc1b --logins login.mywebsite.myappname=johndoe@example.com said command has returned tokens previously. i receiving error "unable construct endpoint cognito-identity in region none" i have retired various cognito identity pools; swapping identity-pool-id , logins appropriate. ideas? ps : if use cli command describe-identity-pool e.g. aws cognito-identity describe-identity-pool --identity-pool-id eu-west-1:c1b83398-09xx-4x38-b10x-2346x1xdc1 i receive same error message. x-posted on aws cognito forum seems region missing aws configuration. can please run 'aws configure' , provide region 'eu-west-1' identity pool belongs region.

java - Attempting to draw a grid in Android using drawRect getting strange output -

i'm attempting draw grid of rectangle objects game of life application. @ stage im trying base grid work. evaluate boolean array live , dead cells , change paint style accordingly. i've simplified code as can testing purposes. im attempting draw 9x6 grid of 100x100 rectangles no padding. here code: paintgrid.setstyle(paint.style.stroke); //sets paint style grid squares int gm = 100; //gridmultiplier determines rectangle size in case 100x100 for(int r = 0; r < 9; r++) //paints grid 9 rows { for(int c = 0; c < grid[0].length; c++) //6 columns { top = r*gm; //sets left side bottom = top+gm; //sets right side left = c*gm; right = left+gm; log.v(logtag, "left: " + left + " right: "+ right+ " top: " + top + " bottom: " + bottom); //testing canvas.drawrect(left, top, bottom, right, paintgrid); //paints de

c# - Unity 4.6p1 UI Crash in any Build -

i replaced gui had in (4.5) new ui system in 4.6. i'm using 4.6p1 unity. game runs in unity editor fine, once has been built crashes on loadup. i've removed ui elements , builds , runs, game has no ui. in unity, console shows 2 errors on build: asset marked hideflags.dontsave included in build: asset: 'library/unity default resources' (you referencing internal unity data in build.) unityeditor.buildplayerwindow:buildplayerandrun() and building - failed write file: temp/stagingarea/data/resources/unity_builtin_extra unityeditor.buildplayerwindow:buildplayerandrun() when crash log when run game, here stack trace: (0x000000013f8dec91) c:\buildagent\work\d63dfc6385190b60\runtime\shaders\material.cpp (280 + 0x0): unity::material::creatematerial + 0x41 (0x000000000478627c) (mono jit code): (filename not available): unityengine.ui.text:get_defaultmaterial () + 0x3c (0000000004786240 0000000004786295) [0000000003cd4d48 - unity root domain] + 0x0 (0x0000

c - Segmentation fault (core dumped) in some cases -

any idea why program fail in downloading images page #12 while did pages 1-9 perfectly? don't know how can debug. maybe there's problem wget when doesn't find first image? http://img717.imageshack.us/img717/7954/white2u.png #include <stdio.h> #include <stdlib.h> // using system calls #include <unistd.h> // sleep int main () { char body[] = "forum-post-body-content", notes[] = "p-comment-notes", img[] = "img src=", link[200], cmd[200]={0}, file[10]; int c, pos = 0, pos2 = 0, fin = 0, i, j, num = 0, found = 0; file *fp; (i = 12; <= 149; ++i) { sprintf(cmd,"wget -o page%d.txt 'http://www.mtgsalvation.com/forums/creativity/artwork/340782-official-digital-rendering-thread?page=%d'",i,i); system(cmd); sprintf(file, "page%d.txt", i); fp = fopen (file, "r"); while ((c = fgetc(fp)) != eof) { if (body[pos] ==

python - multithreaded urllib2 freezes on nose framework -

i have python code uses nose_parameterized below: from nose_parameterized import parameterized multiprocessing.pool import threadpool import urllib2 def make_http_call(url, req_type): opener = urllib2.build_opener() # <=== line causes freeze return 1 pool = threadpool(processes=4) results = [] urls = ['a', 'b', 'c', 'd'] url in urls: results.append(pool.apply_async(make_http_call, (url, 'html'))) d = {'add': []} ind, res in enumerate(results): d['add'].append((res.get(), 2+ind, 3+ind)) @parameterized(d['add']) def test_add(a, b, c): assert a+b == c this dummy version of code. basically, need load test parameters http request responses , since there lots of urls, want multithread them. add urllib2.build_opener, freezes using nose (but still works fine python) also, i've tried urllib2.urlopen; same problem. ideas whether there 'proper' (debuggable) way work around this?

Array of object C++ -

in image below (character.cpp), may know how create 1 initialize method can called stored many sprites? need change texture1 , sprite , posx , posy , etc array? initialize method called in main.cpp. sorry if explaination not enough. idea of doing there better ones instead of having many arrays? void character::initialize1(string image1, float posx1, float posy1, float centerx1, float centery1) { d3dxcreatetexturefromfile(pull->getd3ddev(), image.c_str(), &texture1); d3dxcreatesprite(pull->getd3ddev(), &sprite1); rect spriterect1; spriterect1.top = 0; spriterect1.bottom = 127; spriterect1.left = 0; spriterect1.right = 128; spritepos1 = d3dxvector2(posx1, posy1); spritecenter1 = d3dxvector2(centerx1, centery1); } void character::initialize2(string image2, float posx2, float posy2, float centerx2, float centery2) { d3dxcreatetexturefromfile(pull->getd3ddev(), image.c_str(), &texture2); d3dxcreatesprite(pull->getd3d

install - "extensions folder" empty: python essentials for spss 18 -

i've downloaded paswstatistics_pythonessentials_1802_win64.exe extension bundle pasw statistics 18 (located here ). reason, in pasw statistics 18, when go "utilities>extension bundle>view installed extension bundle" shows nothing installed. when go "utilities>extension bundle>install extension bundle" , navigate c:\program files\spssinc\paswstatistics18\extensions , folder empty. prior installing paswstatistics_pythonessentials_1802_win64.exe , installed python version 2.6. running windows 7 64 bit. pasw statistics 18 , python version 2.6 64 bit. any ideas happening? appreciated. regards, when install essentials, automatically installs python @ same time. first thing check: running 64-bit statistics? statistics either 32 or 64 bit on 64-bit win7. run syntax window. begin program. import spss print spss end program. -- above should in lower case. ipad fighting me. also, should install essentials using run administrator

iphone - iOS Facebook posting using Open Graph fails - error Code 102 -

i using this example post story facebook. have own open graph objects, stories though. this worked when had existing login iphone's native fb app. login 1 administers fb app. have verified including bundle id, url scheme, app store id , on. after time posting, started observing posts getting posted (response code) not appearing in fb timeline. played timeline audience access , on, no avail. then switched user on device fb app, , started getting error code 102. the response doesn't much, except this: error domain=com.facebook.facebook.platform code=102 fbapierrordomain error 3506 i figure from documentation has api session - doing nothing inside app obtain one, , don't know if should, if using above example code. what should ensure have valid facebook session while post? the answer same ming li suggested, , has been derived this . before fb app approval facebook, 1 needs add test users perform actions related permissions.

c# - How to use Enum.Parse in windows phone 7 in a proper way? -

i want parse data enum i'm stumbling upon problem. namely, when try code: languages lang = enum.parse(typeof(languages), languagechooser.selecteditem, true); i info has invalid arguments. think there problem first 1 in every tutorial i've found first arg looks this. or advice? the issue second parameter, not first. languagechooser.selecteditem more returns instance of object rather string . i'm not sure type you're using languagechooser , it's hard proper fix is. of following: // languagechooser bound ienumerable<string> var lang = enum.parse(typeof(languages), languagechooser.selecteditem string, true); // languagechooser bound proper tostring() implementation var lang = enum.parse(typeof(languages), languagechooser.selecteditem.tostring(), true); // languagechooser ienumerable<someothertype> someothertype has property // indicates language var obj = languagechooser.selecteditem someothertype; var lang = enum.parse(type

java - Calculating Avg, Max, and Min using a .txt input file with both integers and strings mixed -

please help. i've looked everywhere , stumped on how finish program. need calculate average, max, , min data input file. need this: system.out.println("the average total score of class is: " + total/27); system.out.println(maxname + "got maximum score of: " + maxval); system.out.println(minname + "got maximum score of: " + minval); for average don't know why while loop in main isn't working. calculates value of zero. don't know how can make 27 isn't hard coded. max , min values, have no clue those. don't have guess. lot of things i've looked @ these use ways haven't been taught (like buffered instance, or using collections class haven't learned either. need basic way of accomplishing these. include have far. appreciated. thank you. input file: 9 andy borders 200 250 400 john smith 120 220 330 alvin smith 225 300 278 mike borell 250 250 500 jim jones 325 325 155 robert fennel 200 150 350 craig fenner 230 220 4

.net - The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Portable\Microsoft.Portable.CSharp.targets" was not found -

when compiling, error the imported project "c:\program files (x86)\msbuild\microsoft\portable\microsoft.portable.csharp.targets" not found. if comment out, get the <targetframeworkidentifier> portable project must .netportable. have ideas is? supposed go? also, oddly portable directory in first error not exist on hard drive anywhere. know how put back? on main pc too... it occurs version of vs (13 , 15) , have uninstalled , re-installed vs. vs installation logs indicated not find portable class update , failed update it. thought directly related portable directory missing. there reason this. i'll try , installer logs failure. after looking @ log file appears have registry issue. set_warning: pkgdef encountered data collision in section &apos;hkey_current_user\software\microsoft\visualstudio\12.0_config\newprojecttemplates\templatedirs\{fe426dcb-ff5c-44a9-b84d-24cf031ba095}\/1&apos; value &apos;&apos; source="visualstudio&q

android - Change Actionbar/Toolbar action text color -

Image
so i'm using appcompat toolbar actionbar. no matter attribute try can't change color of options menu items shown actions. ie have code below , want change color when displayed action white. <item android:id="@+id/action_login" android:title="@string/login_join" vendorsearch:showasaction="withtext|ifroom" /> <!-- apptheme. --> <style name="apptheme" parent="theme.appcompat.light.darkactionbar"> <item name="actionmenutextcolor">@color/white</item> <item name="android:actionmenutextcolor">@color/white</item> </style>

javascript - Knex migration seeding completes with error -

i'm seeding db array looks this, words , definitions in many many relationship var seeds = [ { "word": "click", "definitions": ["computer", "mouse", "tasto", "pulsante", "selezionare"] }, { "word": "galoppo", "definitions": ["cavallo", "andatura", "trotto", "ippica", "passo"] }, { "word": "raggio", "definitions": ["sole", "bicicletta", "diametro", "luce", "laser"] }, { . . .goes on 1089 objects this tried exports.seed = function (knex, promise) { var promises = seeds.map(function (seed) { return knex('words').insert({ word: seed.word }, 'id').then(function (word_id) { var promises = seed.definitions.map(function (definition) { return knex('definitions').

python - Using a stat with a variable -

i writing script checks octal permissions of files , folders in linux. struggling line of code: stat -c %a check check raw input user, example /home . when run script in terminal following error message when line above executed: file "check.py", line 17 stat -c %a check ^ syntaxerror: invalid syntax i tried putting check in brackets , got: traceback (most recent call last): file "check.py", line 34, in <module> main() file "check.py", line 31, in main folderexists(check) file "check.py", line 17, in folderexists stat -c %a (check) nameerror: global name 'c' not defined that line should executed in terminal, not in python script. contains invalid python syntax. if want issue system command python, can use os.system : import os os.system('stat -c %a check') if need add values command string, use str.format : import os os.system('stat -c {} check'.format(value

Dart enum - Polymer -

i happy new feature in dart. but, use in web component (polymer) like this: file.dart enum categoria {id, descricao, natureza, id_subcategoria_da, descricao_subcategoria_da, ativo} @published map itemlist; file.html .. <template> <paper-input value="{{itemlist[categoria.id]}}"></paper-input> </template> <script type="application/dart" src="file.dart"> </script> .. in value on @published there map itemlist , use enum categoria.id key find value of map. it´s possible in web component (polymer)? this isn't supported because types can't used in polymer bindings. the following expressions aren't supported neither , and enums syntactic sugar similar code: class someclass { static final someval = 1; } <template if="{{x someclass}}"></template> <template if="{{x == someclass.someval}}"></template> as workaround can add

uitableview - How to find the sum of all numbers in an array? -

i have class of uitableviewcontroller: class foodlisttable: uitableviewcontroller i have array 9 number values in it: var calorienumberarray = [0,0,0,0,0,0,0,0,0] (yes, values in array change.) trying find sum of values in array. have tried creating constant: let calorietotal = calorienumberarray.reduce(0) { $0 + $1 } i used apple developer page figure out @ https://developer.apple.com/documentation/swift/array . whenever use let calorietotal = array.reduce(0) { $0 + $1 } , error: "'foodlisttable.type' not have member named 'calorienumberarray'" how can fix this? need change way i'm adding numbers in array? here of code class: class foodlisttable: uitableviewcontroller { var calorienumberarray = [0,0,0,0,0,0,0,0,0] let calorietotal = calorienumberarray.reduce(0) { $0 + $1 } var foods = [food]() override func viewdidload() { super.viewdidload() self.foods = [food(name: "small french fries: 197 cal."),food(name: "

r - Complete missing lines using rgl grid3d -

Image
does know of way 1) complete missing gridlines in grid3d call y , , 2) draw horizontal gridlines close top of grids constructed grid3d calls x , y ? i've played around various combinations of pretty calls within grid3d no avail , wondering if rgl quirk or misspecification on part. additionally, i'd extend vertical axis numbering wherever closed grids end up. library(rgl) cpts <- seq(0, 2, length = 40) spts <- seq(0, 1, length = 20) grid <- expand.grid(s=spts, c=cpts) ufn <- function(s,c){c^(0.5) - exp(s) + 1} u <- ufn(grid$s, grid$c) open3d() rgl.surface(x = spts, y = matrix(u,nrow = 40, ncol = 20), z = cpts, coords = c(1,3,2), specular = "black") axes3d("x", @ = pretty(spts, n = 2), color = "black") axes3d("y", @ = pretty(cpts, n = 5), color = "black") axes3d("z--", color = "black") grid3d("x") grid3d("y", @ = pretty(spts, n = 2)) title3d(xla

javascript - How to add a border to a surface? -

this code i'm trying add border surface, i've tried many variations doing wrong? red bar, want kind of border on it, proves difficult, what's going on? var surface = new surface({ size: [window.innerwidth/2, 10], border: [10], properties: { background: 'red', border:10, bordercolor:'blue'} }); var sizemodifier = new modifier({ size: [window.innerwidth, window.innerheight] }); var alignmodifier = new modifier({ align: [0.5, 0.5], origin:[0.5, 0.5] }); maincontext.add(sizemodifier).add(alignmodifier).add(surface); it seems surface has small height draw 10px border. should add line style border e.g. solid. try following see border: var surface = new surface({ content: '<h1>famous in jsfiddle</h1>', size: [window.innerwidth / 2, 100], border: [10], properties: { background: 'red', border: '10px solid', bordercolor: 

php - Html injection in my site -

well, have big problem: day inserting html code in index.php , don't know how, code inserted: <iframe src=**bad url here** width=0 height=0 frameborder=0></iframe> i tried prevent problem: $_get = sanitize::filter($_get); $_post = sanitize::filter($_post) my sanitize class filter content in $_get , $_post problem continue. this sanitize file: abstract class sanitize { /** * filter * * @param mixed $value * @param array $modes * @return mixed * @static * @since 1.0 */ static public function filter($value, $modes = array('sql', 'html')) { if (!is_array($modes)) { $modes = array($modes); } if (is_string($value)) { foreach ($modes $type) { $value = self::_dofilter($value, $type); } return $value; } foreach ($value $key => $tosanatize) { if (is_array($tosanatize)) { $value[$key]= self::filter(

ios - centralManagerDidUpdateState throws unrecognized selector sent to instance error -

i have view controller starts bluetooth scan when push button. here .h file: #import <uikit/uikit.h> @import corebluetooth; @interface viewcontrollerintropage2 : uiviewcontroller{ iboutlet uibutton *scanforfetchtagsbutton; } @property (nonatomic, retain) uibutton *scanforfetchtagsbutton; @property (nonatomic, retain) cbcentralmanager *mcentralmanager; -(ibaction)scanbuttonpressed:(id)sender; @end here .m file: #import "viewcontrollerintropage2.h" #import "bluetoothlemanager.h" @interface viewcontrollerintropage2 () @end @implementation viewcontrollerintropage2 @synthesize scanforfetchtagsbutton; - (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil { self = [super initwithnibname:nibnameornil bundle:nibbundleornil]; if (self) { // custom initialization } return self; } - (void)viewdidload { [super viewdidload]; // additional setup after loading view. } - (void)didreceivem

java - Could not load: InvalidPluginException -

i doing teleportation plugin. there fix this? when loading on server, error: [15:46:39 error]: not load 'plugins\rteleport.jar' in folder 'plugins' org.bukkit.plugin.invalidpluginexception: cannot find main class `me.roofer.rtel eport' @ org.bukkit.plugin.java.pluginclassloader.(pluginclassloader.jav a:42) ~[craftbukkit.jar:git-bukkit-1.7.9-r0.2-20-g0b2ed13-b3108jnks] @ org.bukkit.plugin.java.javapluginloader.loadplugin(javapluginloader.j ava:127) ~[craftbukkit.jar:git-bukkit-1.7.9-r0.2-20-g0b2ed13-b3108jnks] @ org.bukkit.plugin.simplepluginmanager.loadplugin(simplepluginmanager. java:328) ~[craftbukkit.jar:git-bukkit-1.7.9-r0.2-20-g0b2ed13-b3108jnks] @ org.bukkit.plugin.simplepluginmanager.loadplugins(simplepluginmanager .java:251) [craftbukkit.jar:git-bukkit-1.7.9-r0.2-20-g0b2ed13-b3108jnks] @ org.bukkit.craftbukkit.v1_7_r4.craftserver.loadplugins(craftserver.ja va:364) [craftbukkit.jar:git-bukkit-1.7.9-r0.2-2

java - Objectify can't find entity that appears to exist -

i'm using objectify 5.1.1 on google app engine. have defined objectify entity called insight , tried query boolean property called downloaded. however, objectify can't find entity. here's how i'm trying query: query<insight> insightquerytemplate = ofy().load().type(insight.class). filter("downloaded", false).first().safe(); here's stripped down class definition insight: @com.googlecode.objectify.annotation.entity public class insight { @com.googlecode.objectify.annotation.id public long id; public boolean downloaded = false; public insight () { } } when in development server's datastore can see entity exist downloaded property says "false (unindexed)" instead of "false". i'm pretty sure used work objectify 3.1 doing wrong? i think tag @com.googlecode.objectify.annotation.index needs annotated on class this: @com.googlecode.objectify.annotation.entity public

FatFree, form data validation -

i see fatfree has audit class data validation, there no methods check example min or max length allowed, or if field should mandatory or not. should extend audit class, provide abillity? right way it? right, if need more here extend audit class.

ie11 to ie9 compatibility mode by javascript -

i'm working sp2010 environment default master page come meta tag: meta http-equiv="x-ua-compatible" content="ie=8" which presents forms (infopath) in view in browsers except ie11 if try add meta tags ie=9 or edge, it'll fix problem in ie11, other explorers go blank. is there way stay 1st meta tags (ie=8), & add javascript that's tell ie11 only compatible ie9? i try lot of option found here & web, this: html: how force ie11 emulate ie9 in html? but nothing works… for ie11, can try using enterprise mode . hope helps... -- lance

javascript - Is it Possible/Okay to have two controller files for one view in meteor? -

so heres folder structure client: https://s3.amazonaws.com/f.cl.ly/items/0i0s063e3u0a2o2s3k21/image%202014-12-05%20at%206.42.17%20pm.png the problem have 2 states tournaments... 1 live , 1 nolive. use exact same views ect potentially have different functionality. is there trick can use 2 different controllers same view based on data view needs load in iron router or something? -thanks for reference here my: routes.js tourneys: /* tournaments / browse section */ router.route('/tournaments/:_id', function () { this.fastrender = true; // add subscription handle our waitlist this.wait(meteor.subscribe('campaigns')); // this.ready() true if items in wait list ready // console.log("tournaments.findone({_id: this.params._id}:", campaigns.findone({_id: this.params._id})); if (this.ready()) { this.render('tournament', { data: function () { return campaigns.findone({_id: this.params._id

Google Analytics with R -

i new google analytics api.....i authenticated application in r using code: library(rgoogleanalytics) client.id <- "**************.apps.googleusercontent.com" client.secret <- "**********************" token <- auth(client.id, client.secret) save(token,file="./token_file") validatetoken(token) i figuring out need enter in below credentials: query.list <- init(start.date = "2011-11-28", end.date = "2014-12-04", dimensions = "ga:date,ga:pagepath,ga:hour,ga:medium", metrics = "ga:sessions,ga:pageviews", max.results = 10000, sort = "-ga:date", table.id = "ga:33093633") where can find dimensions, metrics, sort, table.id my eventual goal pull text " https://plus.google.com/105253676673287651806/posts " please assist me in this.... using google analytics , r may not suit want here, google+ website won't included in data collect. y

javascript - Declaring new variables or using references in functions? -

when defining methods class, better use members or assigning them new variable make faster? imagine, instance in javascript following method: square: function() { var x = this.x; x *= x; return x; } or square: function() { this.x *= this.x; return this.x; } in general, difference in speed negligible, meaning premature optimization , should avoided in favor of using whatever method more maintainable. however, in particular case there major difference in functionality between 2 square methods, shown below. var = { x: 2, square: function() { var x = this.x; x *= x; return x; } } console.log('result of a.square():', a.square()); //output 4 console.log('after square, a.x is:', a.x); //output 2 var b = { x: 2, square: function() { this.x *= this.x; return this.x; } } console.log('result of b.square():', b.square()); //output 4 //the

Freebsd gcc installed but not available -

i new freebsd. have installed gcc unable run it. root@mybook:/home/accessp # pkg install gcc updating freebsd repository catalogue... ... ... ... new packages installed: gcc: 4.8.3_2 the process require 345 mb more space. 67 mb downloaded. proceed action? [y/n]: y fetching gcc-4.8.3_2.txz: 100% 67 mb 84.5k/s 13:52 checking integrity... done (0 conflicting) [1/1] installing gcc-4.8.3_2: 100% root@mybook:/home/accessp # gcc gcc: command not found. where has gcc been installed? or have additional steps complete installation? edit i have seen in /usr/local/bin. not there. have done find gcc , here result: /usr/libdata/gcc /usr/local/lib/gcc48/gcc /usr/local/libdata/ldconfig/gcc /usr/local/libexec/gcc48/gcc /usr/include/gcc /usr/ports/lang/gcc49/work/gcc-4.9-20141015/gcc /usr/ports/lang/gcc49/work/build/gcc /usr/ports/lang/gcc since can ins

keeping safe assets folder in codeigniter -

hi have assets folder has following folder inside of css, images, uploads, , js folder put assets folder outside application. im wondering how keep safe when users tried type in url example http:/test.com/assets redirect application folder or says page not found. cause ive noticed when type in url http://test.com/assets go assets folder , vulnerable , people see folders in assets folder. can me figued thing out? muchly appreciated. if want secure folder 1 create html file <html> <head> <title>403 forbidden</title> </head> <body> <p>directory access forbidden.</p> </body> </html> and save index.html , put on assets folder whenever try access url http://test.com/assets index file execute , shows directory access forbidden.

How to include jQuery library in Javascript without <script src=""> -

i need include jquery library in javascript file (john.js) remotely. have tried without luck; (function(d, t) { var g = d.createelement(t), // create script tag s = d.getelementsbytagname(t)[0]; // find first script tag in document g.src = 'http://code.jquery.com/jquery-latest.js'; // set source of script script s.parentnode.insertbefore(g, s); // append script dom }(document, 'script')); $( document ).ready(function() { // jquery works here }); i want fetch script in javascript way. correct way ? the error here jquery not loaded yet when code executed: $(document).ready(function() { .. } as is, error this: $ undefined (or similar) you should use onload event of created script element sure loaded jquery. this sample shown how can achieve goal. luck. var newscript = document.createelement('script'); newscript.type = 'text/javascript'; newscript.src = 'http://code.jquery.com/jquery-latest.js'

Adding 'where' in Entity Framework query didn't work? -

erpentities dbentities = new erpentities(); var clscode = "001"; var items = dbentities.clsitem.select(aa => aa); if (clscode != null) items.where(aa => aa.clscode == clscode); var _test = items.tolist(); there 21 rows in table clsitem . after executing, result of _test.count() 21 (which means item.where() ) didn't work. but if use var _test = dbentities.clsitem.where(aa => aa.clscode == clscode); , i'll expecte. why ? how can filtered data if need have if expression see wheather clscode not null before executing query? (i don't want whole data in database) you not result of items. where not change source collection. method returns new collection. erpentities dbentities = new erpentities(); var clscode = "001"; var items = dbentities.clsitem.select(aa => aa); if (clscode != null) items = items.where(aa => aa.clscode == clscode); // strin

swing - JButton in single table cell java, not entire column -

i have been researching jtables thoroughly, , have found brilliant resources explain how set cellrenderer , celleditor columns, have found trying set renderer , editor of single cell little less forthcoming. the general idea of table have 2 columns, left column displays variable names, , right column allows modification of associated variables. cells have been able perform validation on, , found out how use defaultcellrenderer , defaultcelleditor way required, trying custom renderers , editors struggling with. below have tried indicate how table under design look: (left hand value variable name, right hand value) x 0 y 0 isdestructable [checkbox] image [clickable cell] the image value should allow user click cell, bring jfilechooser, , extract response , render string representation inside cell. have numerous snippets of code written, trying link them bit lost on. below have provided code have far relating these functions