Posts

Showing posts from June, 2014

c# - SQL Server Compact 4.0 DbProvider - No -

i'm using sql server compact/sqlite toolbox visual studio erikej. environment windows 7 x64 visual studio 2013.5 i'm following along in example on blog http://erikej.blogspot.dk/2013/11/entity-framework-6-sql-server-compact-4_25.html when " ... connect database file in project folder:", i right click "add sql server compact/sqlite connection" , box comes up, @ bottom in red "cannot save connection use ef6 tools, make sure sql server compact dbprovider installed, , possibly restart visual studio" i go , click on button , get sql server compact 4.0 in gac - yes - 4.0.8482.1 sql server conpact 4.0 dbprovider - no sql server compact 4.0 ddex provider - no sql server compact 4.0 simple ddex provider - yes sql server compact 4.0 engine test: pass! i've uninstalled sql server compact , sql server compact toolbox , reinstalled both still have same error. i'm wondering how sql server compact 4.0 dbprovider yes? thanks edi

asp.net mvc - How to show entered order no and selected product name and id -

i new in mvc. not figure out add in code show entered order no , selected product name , id. here full code , dotnetfiddle url https://dotnetfiddle.net/6vn2go model code using system; using system.componentmodel.dataannotations; using system.web.mvc; using system.collections.generic; namespace helloworldmvcapp { public class orderviewmodel { [display(name = "order number")] public int? ordernumber { set; get; } [display(name = "product")] [required(errormessage = "please select product")] public int selectedproductid { set; get;} public selectlist productlist { get; set; } } public class product { public int id { set; get; } public string name { set; get; } } public static class repository { public static ienumerable<product> fetchproducts() { return new list<product>() { new produc

Is the GNU C++ compiler ((GCC) 5.2.0) good at "inlining" by itself? -

i'm not asking why or when should use inline in code. i use inline think it's usual (like in get/set functions). read on stack unusual example inline sounds necessary. i'm not sure i'll recognize such situation in code... mean, until issue... so wonder if usual cases compiler handles do, maybe better... the reason why avoid inline , avoid having implement in headers ... question pop in mind: is compiler (i consider gcc compiler in question) able inline function not implemented in header ? n.b. : don't know if there internal changes inline in c++14. without kind of example code, it's hard sure compiler (even code, can pretty darn difficult). generally speaking, if function small, compiler inline functions have source code available during compilation (and others if enable lto (link time optimisation). if expect able compile function object file , function inlined, have use lto. a function large , static, called once inlined in case

.net - MySQL does not honor a varchar column size change -

i have mysql instance running under windows 8.1(dev machine). have table defined 1 of columns varchar(50). need change varchar(100). when in mysql workbench, change made , looks good. problem when run .net app uses database, if send data more 50 characters column long error. after stoping/starting database. am missing obvious?

javascript - Trying to understand Backbone.js routing betwen views -

i new backbone , trying understand concepts. trying create backbone.js application (with underscore templates) of views protected login page , have logout button on them. the idea if non-logged in user navigates specific view, should see login page , once logs in redirected view tried go to. code looks this router code routes: { "" : "home", "authview" : "authview", }, login: function(view) { if(isuserloggedin()) { $('#content').html(view.el); } else { var loginview = new loginview(view.model) $('#content').html(loginview.el); app.vent.on("login:success", function(){ loginview.remove(); $('#content').html(view.el); }); } }, authview: function() { this.login(new authview()); } authview authview = backbone.view.extend({ events: { &quo

input - Using python to achieve replace function -

i trying operate file this: *sline 1, 1.0, 2.23 2, 1.0, 9.98 3, 2.0, 10.00 *eline now have list, contain data this: datalist = [[1,1.0,2.0],[3,2.0,2.0]] i want put value belong datalist replace value in file id(datalist[][0]), like: *sline 1, 1.0, 2.0 2, 1.0, 9.98 3, 2.0, 2.0 *eline i try utilse: o = open("file","a") line in open("trychange.txt"): line = line.replace("1, 1.0, 2.23","1, 1.0, 2.0") line = line.replace("3, 2.0, 10.00","3, 2.0, 2.0") o.write(line + "\n") o.close() but doesn't work, add new values didn't change old one. how can deal this? helping open file "r" mode , read contents. while reading in contents of file (strings) convert lines easy-to-process data structures (e.g.: list of integers...) process previous read contents in memory. note while read in file (or after reading file) can build several auxiliary data structures

aws Redis cluster from spring using jedis client -

i have integrated redis spring web application using jedis (redis supporting aws elastic cache). working fine single node write , read single jedis connection factory. i need extended cluster writing primary node , reading secondary nodes. i.e if 1 goes down replication happen automatically aws, in case host name, connect , change. how can read new node came picture? how can connect spring container (i mean xml file)? please, 1 have useful suggestions, achieve above scenario. i appreciate links or code may helpful on come above problem. as of now, using 1 connection factory, jedis , redis template manipulation. you don't have on side, aws elasticache handle failover. you have redis cluster 2 nodes, primary , replica. if happens primary node, there automatic failover replica node. the failover happens @ replication group node dns level it important application connects replication group node , not primary node url/ip directly you can find replication

click - android app admob clicking your own ads violations downloaded from playstore -

i have doubt in admob terms , conditions., consider example. i developed android application admob., , published in play store. admob saying "clicking own ads leads suspension of admob ac" but, want use application. if do., see ads , may click on ads. note: app download playstore. (not test app or in develop app). the publisher google ac , app downloader's ac playsote same. (it means, want download app playsote use). question 1 : if click ads in app downloaded form playstore means violating admob terms or not? question 2 : if do., how use app user?., see., here became 1 of user others., can see location based ads , if interested in ads means can click ads know!!!! if trying cheat in case may don't count clicks., because know developer. why allow developers click ads?, allow suspend if dev clicks!!! i seek expert views above case., rude me rules. there no discussion here. if not agree out admob. one more answer was, if skill enough developer mean

c# - Why won't my code upload a file to the specified folder on the web server when using the fileupload control? -

good afternoon. have asp.net web forms application using c#. having difficulty getting code work properly. data uploaded sql server database, file isn't saved specified "data" folder. appreciated? the id of fileupload control "fu_doc_upld". don't errors when using form, files aren't saving "data" folder (or other folder). here code behind i'm using: protected void btn_frm_new_doc_save_close_click(object sender, eventargs e) { int = 0; string filename = fu_doc_upld.filename; if (fu_doc_upld.hasfile) { while (system.io.file.exists(server.mappath("~/data/") + filename)) { i++; filename = fu_doc_upld.filename + " (" + i.tostring() + ")"; fu_doc_upld.postedfile.saveas(server.mappath("~/data/") + filename); } } hdn_filename_txt.value = (server.mappath("~

ios - Performing Segue using code gives shows black screen -

Image
i trying segue screen using code shows me black screen using xcode 7 beta 6. here 1st view controller file code // viewcontroller.swift // segue through programming // import uikit class viewcontroller: uiviewcontroller{ @ibaction func buttonpressed(sender: anyobject) { presentviewcontroller(secondcontroller(), animated: true) { () -> void in } } override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } } this work if secondcontroller programmatically creates view. if want use storyboard scene (which far more common), can following: @ibaction func buttonpressed(sender: anyobject) { let controller = storyboard?.instantiateviewcontrollerwithidentifier("foo") presentviewcontroller(controller!, animated: true,

javascript - Google Chrome Extension: How to use an external script -

i trying make markdown preview tab forum use uses markdown in it's formatting not have way preview markdown like. i want use page down markdown converter don't know how use files inside content script here manifest.json { "name": "forum post previewer", "version": "0.1", "manifest_version":2, "description":"adds preview tab on post editor", "permissions": [ "activetab", "*://*/*" ], "content_scripts": [ { "js": ["previewtab.js"] } ], } and here previewtab.js // adding preview tab var tabs = document.getelementsbyclassname("nav nav-tabs"); var list = document.createelement("li"); var tab = document.createelement("a"); tab.innerhtml = "preview"; tab.setattribute("data-toggle", "tab"); tab.setattribute("href&quo

php - mysqli_error() expects parameter 1 to be mysqli, null given -

i have a form pulls data database(mysql specific) , echos data value section of <input> tags. doesn't seem working have coded view section of website same thing different table in database. use same code make making changes easy , if developer works on site in future. anyway doesn't seem working i'm not sure why though. the full error get: warning: mysqli_query() expects parameter 1 mysqli, null given in /home/caseol5/public_html/jj/admin/news_update.php on line 9 here line 9 error referring to: $result = mysqli_query($link,$sql); i know both of function not null did: echo $link echo $sql before line after started feting error , both not null. here full code segment: $nid = $_get['nid']; include ("../sql/dbconnect.php"); $sql = "select * jj_news news_id = $nid"; echo "<p>the sql command: $sql </p>"; echo "<p>link: $link </p>"; $result = mysqli_query($link,$sql);

php - Crawling a second page answer; curl -

i'm crawling few websites, it's working fine, but .... have 1 specific website i'm trying crawl, , it's making few "redirects" before landing web want. so it's ... http://www.example.com/?day=01/01/2016&action=search_prices this go http://www.example.com/search/default.aspx take few seconds search answer page , show on there. is there way this? hint, clue, etc awesome simple code right (almost sites crawling jsons): function get_web_page( $url ){ $options = array( curlopt_returntransfer => true, // return web page curlopt_header => false, // don't return headers curlopt_followlocation => true, // follow redirects curlopt_encoding => "", // handle encodings curlopt_useragent => "spider", // curlopt_autoreferer => true, // set referer on redirect curlopt_connect

powershell - PPM not Viewable -

i output python script file through windows powershell using py test.py > image.ppm output file formatted exact number of pixels , such, reason cannot opened/viewed unless copy , paste new file. suggestions awesome, thank you! for reason powershell outputs text in different way cmd. using cmd fixes issue.

javascript - on mouse enter misbehaving in Chrome -

i have on-mouse-enter trigger code (javascript listen mouse enters , css transitions) , lately, it's been acting funny in chrome; tested on v 44.0.2403.157m without error in console. acting funny, mean fade in-out effect skipping. var shown = true; var parent = document.queryselector('.parent'); var child = document.queryselector('.child'); parent.addeventlistener('mouseenter', function(){ child.style.opacity = shown ? 0 : 1; shown = !shown; }); * { margin: 0; padding: 0; } .parent { width: 100%; margin: 10px auto; position: relative; } .child { position: absolute; top: 0; width: 100%; height: 100%; display: block; overflow: hidden; transition: opacity 0.5s linear; } p { padding: 1em; } <div class="parent"> <img src="http://www.fundraising123.org/files/u16/bigstock-test-word-on-white-keyboard-27134336.jpg" alt="" width="500px" hei

c++ - What is an undefined reference/unresolved external symbol error and how do I fix it? -

what undefined reference/unresolved external symbol errors? common causes , how fix/prevent them? feel free edit/add own. compiling c++ program takes place in several steps, specified 2.2 (credits keith thompson reference) : the precedence among syntax rules of translation specified following phases [see footnote] . physical source file characters mapped, in implementation-defined manner, basic source character set (introducing new-line characters end-of-line indicators) if necessary. [snip] each instance of backslash character (\) followed new-line character deleted, splicing physical source lines form logical source lines. [snip] the source file decomposed preprocessing tokens (2.5) , sequences of white-space characters (including comments). [snip] preprocessing directives executed, macro invocations expanded, , _pragma unary operator expressions executed. [snip] each source character set member in character literal or string literal, e

java.util.scanner - Java Scanner ignores answer -

hi it's first post here , have problem: i have program in which, @ point, asks user if wants share stars, , if supposedly does, program goes collecting them , after time comes question if wants share them again. the problem that, when user comes point, program ignores whatever answer u give , goes "else answer block". it looks this: "do want share stars? yes please answer yes or no" code: import java.util.random; import java.util.scanner; public class app { static scanner skan = new scanner(system.in); static int starcount = 0; static random random = new random(); public static void main(string[] args) { starreaching(); } static void starreaching() { boolean starcollected = false; int = 0; int j = random.nextint(101); while (i < j) { i++; system.out.println("stars out of reach"); } if (i > j || == j) { starcollected = true; } if (starcollected == true) { st

import.io crawler for non-standard system of pagination -

i trying build import.io crawler site http://theaccelblog.squarespace.com/ when click "next" next page train, takes me first page because of system of pagination being used. appreciate suggestions on how import.io crawler crawl through these pages. suggested on import.io website tried find system of pagination in packets being exchanged server did not succeed. if can help. jrh i used bulk extract create api. https://import.io/data/mine/?id=bc7d67f2-24d3-4b5c-b134-01544430998a if use offset pagination below can input bulk , data need. http://theaccelblog.squarespace.com/?offset=1418833411427 http://theaccelblog.squarespace.com/?offset=1409932229141 http://theaccelblog.squarespace.com/?offset=1402342675828 http://theaccelblog.squarespace.com/?offset=1397601000000 http://theaccelblog.squarespace.com/?offset=1397511000000 http://theaccelblog.squarespace.com/?offset=1390543200000 http://theaccelblog.squarespace.com/?offset=137538360000

javascript - Run code on window resize -

i'm trying run code when window resizing, code: $(document).ready(function () { updatecontainer(); $(window).resize(function() { updatecontainer(); }); $('#slider').lightslider({ item:1, slidemove:1, slidemargin: 30, loop: true, autowidth: slidewidth }); }); function updatecontainer() { var $winwidth = $(window).width(); if ($winwidth > 1100) { var slidewidth = false; /* toggle navigation ======================================================================== */ $('.menu, .search, .categories').click(function(e) { $(this).toggleclass('active'); e.preventdefault(); }); /* top =======================

c++ - Minimalist framework -

i've read somewhere inversion of control (ioc) (kind of) principle of framework. is correct (taking advantage of that) designed framework x because ioc pattern employed? may ask minimal framework example (c++ code please)? or instead, can try more specific, providing code (a complete qt project) , asking if there framework there. the class frameworkforx (below, @ end) might called framework? framework.pro qt += core gui greaterthan(qt_major_version, 4): qt += widgets target = framework template = app sources += main.cpp\ widget.cpp \ frameworkforx.cpp \ solvemyproblem.cpp headers += widget.h \ frameworkforx.h \ solvemyproblem.h main.cpp #include "widget.h" #include <qapplication> int main(int argc, char *argv[]) { qapplication a(argc, argv); widget w; w.show(); return a.exec(); } widget.h #ifndef widget_h #define widget_h #include <qwidget> class qlineedit; class qlabel; class solv

c# - How to change Highlight color of the selected ListView item in UWP (Windows 10) -

i'm working on windows 10 app using c# , xaml. have listview , want change default highlight color of selected item. seeing many code examples (like this ) designed wp8 or win8, trying implement not work me. in general i'm having troubles modifying default themes of controls because don't find useful documentation. great if can me highlight color , recommend me documentation. actually better way discover styling properties use blend. first, open page in blend. right click on listview , go edit additional templates > edit generated item container (itemcontainerstyle) > edit copy . give name , hit ok . now, have generated full built-in style listviewitem s , can find information appearance, animations , other visual behaviors. you should @ piece of code - <listviewitempresenter checkbrush="{themeresource systemcontrolforegroundbasemediumhighbrush}" contentmargin="{templatebinding padding}"

c# - System.Net.Sockets missing in ASP.NET dotnet framework? - ASP.NET vNext -

prologue: made "web class library" support new clr 5.0 introduced asp.net vnext, , 1 of features need use networkstream class in system.net.sockets. problem that, somehow, can't "reference" system.net.sockets in project.json file of class library. intellisense has 1 suggestion under system.net , it's system.net.webheadercollection. can reference in project.json of console application made test class library. class library uses dotnet framework , console application uses dnxcore50 , dnx451 frameworks, might compatibility issue (but understand, dotnet meant more broad framework applications needed support of frameworks). another weird issue noticed (the icing on cake) whenever open project fresh (only happens if visual studio open fresh well, guess because project loading up?) networkstream , tcpclient classes show in blue text, showing they're recognized. if hover on them, shows me namespace, they're legitimate. if there's can do, please

Ruby format.json add text to model column -

i add text model when json object returned. example format.json { render :json => @user.to_json, :status => 200 } the @user model contains field called website. user websites in format www.mysite.com, want resulting json display http://www.mymysite.com . for example, there thousands of users. @users = user.all format.json { render :json => @users.to_json, :status => 200 } i don't want go through users , update website column 1 one. there way define in model returned value of website http:// + self.website? the more research looks override method def as_json(options = {}), i'm not sure how modify website field. you can have method following in user model class ( app/model/user.rb ): def website_with_protocol "http://#{self.website}" end then, able do: @user.website_with_protocol user's website http:// in beginning. or, if don't mind, can override website column in database defining website method in mode

javascript - Empty images when resizing images using canvas -

i'm developing image resizer files input field multiple files. the files first added array of json objects, because use array in webapp add, remove , rearrange objects. my problem firefox , ie11 both presents empty images when traversing trough filelist, , can't figure out going wrong, , neither has figured out workaround firefox , ie. chrome resizes , show images ok. i have tried 2 diferent methods. serial function traversing trough files array, , asyncronous read-resize-show function. both have same problem empty images. the html is: <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta charset="utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1" /> <script src="test.js"></script> </head> <body> <input type=&quo

c++ - how can i allocate memory for a union member that haven't been initialized -

i have got union of 2 members. union myunion { std::wstring mem1; int mem2; myunion(std::wstring in){ this->mem1 = in; } myunion(int in){ this->mem2 = in; } myunion(const myunion& in){ if(this->mem2){ this->mem2 = in.mem2; }else{ this->mem1 = in.mem1; } } }; //and make vector out of union: std::vector<myunion> unions; //but when try push_back: unions.push_back(l"a"); it breaks out run time error: 0xc0000005: access violation writing location 0xcccccccc. , when try debug program, realize mem1 have not been allocate memory. don't know why happens , want know how can fix it. in c++, union not natural datatype, because doesn't fit naturally whole c++ idea of constructors , destructors. when create union in c++, not call constructors of possible types, because writing on top of eachother. so constructor myunion(std::wstring in){

php - Comparing XML file to an array -

i'm trying compare xml files. have pulled new.xml apart , put barcodes array. trying loop through old.xml file , testing if barcode exists in array. if barcode exist want echo table row. when working flip print if ! exist. xml files structured this: <products> <product> <id>2209</id> <barcode>4890888123702</barcode> </product> </products> my html , php looks this: <html> <head> <title>feeds = $$$$</title> <!-- latest compiled , minified css --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <!-- latest compiled , minified javascript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3

c++ - Accessing a pointer to a member class which stores a pointer to another member class -

i have 1 class point data storage member class (inputs): class calc { public: calc(inputs *input) : input(input) {} void performcalc(); private: inputs *input; }; in inputs class store various data inputs: class inputs { public: inputs(std::string &directory, logfile &log); ~inputs(); private: writelogfile &writetolog; weatherdata *weather; evaporationdata *evaporation; friend class calc; } now, when in performcalc() method, can't access weather class in inputs object member of calc class using pointer notation? input->weather //does not work nor dot notation work (which didn't think would, since nothing linked passed reference here.) input.weather //does not work what missing? edit: sorry! forgot mention calc class friend class inputs class. you have defined weather private member of inputs , isn't visible calc object. have 3 options: make weather public. make calc friend of

arrays - Random Number Generating in Java -

i new programming , have started learn arrays , doing fine until got array stores random numbers inside of it. line of code below 1 baffles me most. for (int roll = 1; roll <=6000000; roll++) ++frequency[1 + randomnumbers.nextint(6)]; before imported random class , made new object named randomnumbers declared variable frequency array 7 integers. book reading tells me line above rolls die 6 million times , uses die value frequency index. i understand going through in iteration 6 million times says in body each time, not see in body sets variable equal random number. think biggest thing missing means increment frequency[] because understand within brackets there random number between 1 , 6 being added 1. therefore 6 million iterations should pass frequency[1] through frequency[7] if chance happen, yet though passes them not see how sets equal arrays. can please explain line of code me step step barney style? can't seem wrap head around it. that routine br

lisp - Python-String to function in 'eval' -

i'm trying build lisp interpreter in python using 'eval'. def func(e1,*elements): print(e1) eval((input())) its working integers.but there way can use input strings? eg: when input: f(a,b,3,5,2) the above code should print: a i don't want input as: f('a','b',3,5,2) thanks! the way convey string value enclosing within quote. other way declaring string variable separately , send parameter instead. however, when print string query in interactive command window, won't printed quotes aroun

android - How does one retrieve the cameraID and use setTorchMode? -

so android m came out , has built in cameralight function called settorchmode. curious how worked parameters (string cameraid, boolean true/false). boolean dictates whether light on or off, how cameraid? know there's method called getcameraidlist, returns array of ids, not one. how know 1 in list use? you should use cameramanager "getcameraidlist" function retrieve list of strings each represent active camera.

markdown - Adobe-Brackets, Change the default syntax for a file extension -

Image
i using adobe brackets text editor. i can't seem find answer changing default syntax used file extensions (file-ext). in case, change default markdown syntax instead use included "markdown (github)" syntax. assumed there option somewhere control this, when go change language manually, whilst editing file, in selection menu "markdown" has word default afterwards. how can change default syntax per file extension? in top of "file type selection" there option set current default: alternatively, can map file extensions (and file names) existing languages in preferences : { "language.fileextensions": { "md": "gfm" } } note: valid @ least latest version of brackets (1.4).

php - Json_encode data using JSON.parse in javascript -

php file <?php include"connection.php"; $id = $_get['edit']; // echo $id; $sql = "select * form id=$id"; $result = $conn->query($sql); $row=$result->fetch_assoc(); $json_res=array(); $json_res = array('user'=>($row)); echo json_encode($json_res); $conn->close(); ?> javascript file <script type="text/javascript"> function loadup(str){ var xmlhttp; if (window.xmlhttprequest) {// code ie7+, firefox, chrome, opera, safari xmlhttp=new xmlhttprequest(); } else {// code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4 && xmlhttp.status==200) { // var json = '{"user":[{"id":"45","name":"dfgmohan","loc":"cherthala","dist&q

c# - Get 50 employees data from each department list -

this code public class viewmodel { public list<department> departments{ get; set; } } public class department { public department(); public list<employee> employees{ get; set; } } public void post(viewmodel response) { viewmodel viewmodel= new viewmodel { departments= new list<department>(){ new department{ employees= response.departments[0].employees.take(50).tolist() } } }; } in above code got 50 employees data first department, want each department employees data try this: viewmodel viewmodel= new viewmodel { departments = response.departments.select(x => { x.employees = x.employees.take(50).tolist(); return x; }) .tolist() }; see working filddle

Java - contains check all items in an arraylist meet a condition -

myarraylist = {"method , apparatus","system , method same","drive-modulation method"," method orthogonal"} how can check if items (myarraylist) contains word "method" (irrespective of case) boolean method return true if items contain word, else false iterate , use contains. remove or conditions if want case specific. public static boolean islistcontainmethod(list<string> arraylist) { (string str : arraylist) { if (!str.tolowercase().contains("method")) { return false; } } return true; }

Not able to add user to ejabbered using c# and agsXMPP -

i developing chat application in ios , apis on windows server. have got ejabbered installed on server , able connect c# using agsxmpp. the issue not able register user every time, executes , not. below code: static manualresetevent done = new manualresetevent(false); public void login() { xmppclientconnection xmpp = (xmppclientconnection)application["xmpp"]; try { if (xmpp == null) { xmpp = new xmppclientconnection(); application["xmpp"] = xmpp; } xmpp.onlogin += new objecthandler(xmpp_onlogin); xmpp.onerror += new errorhandler(xmpp_onerror); xmpp.autopresence = true; xmpp.autoresolveconnectserver = false; xmpp.port = 5222; xmpp.usessl = false; xmpp.connectserver = "127.0.0.1"; xmpp.server = "plutus-pc1"; xmpp.username = "admi

rhel6 - RHEL 6 No protocol specified, can't open display -

i got when try open nco_event in rhel 6.3 [netcool@noi bin64]$ nco_event& [1] 19962 [netcool@noi bin64]$ no protocol specified fatal error: /opt/ibm/tivoli/netcool/omnibus/platform/linux2x86/bin64/nco_event: can't open display any idea solved that? use putty & xming connect machine? if not, check xorg server on client. can check $display variable

php - {"line_items":"Required parameter missing or invalid"} -

i using shopiy api fulfill order in php platform. when try fulfill order, can able complete , getting success response fron shopify. if pass line_items params getting {"line_items":"required parameter missing or invalid"} can 1 me figure out issue. <?php require_once("inc/functions.php"); $shop = "my-store"; $fulfilment = array("fulfillment" => array ("tracking_number" =>"123456789", "tracking_company" => "fedex", "line_items"=>array(array("id"=>2143139779)))); $response = shopify_call('accesstoken', $shop, "/admin/orders/1123553027/fulfillments.json", $fulfilment, 'post'); print_r($response); ?> you need quantity each line item. e.g. "line_items" => array( array("id" => 12345, "qu

swt - Eclipse GEF - Select figures -

i using gef framework show network of connected nodes. have topeditpart diagram , 1 editpart each node , connections. diagram rendering properly. need select node , outgoing connections , connected nodes should change different color. started off @ editpolicies gef provides, have no clue edit policy use highlight figure ie., show selection feedback. in regard appreciated. have tried: i created class extending xylayouteditpolicy , installed on rooteditpart public class basicxylayouteditpolicy extends xylayouteditpolicy { protected command createaddcommand(editpart child, object constraint) { return null; } protected command createchangeconstraintcommand(editpart child, object constraint) { return null; } protected command getcreatecommand(createrequest request) { return null; } protected editpolicy createchildeditpolicy(editpart child) { return new noderesizableeditpolicy(); } protected command getdeletede

git - SSL Seafile and SSL Gitlab Apache Forwarding Problems -

i´ve set apache files 2 ssl services(seafile , gitlab subdomain). both defined via dnsmasq , point on own server ip. i´ve 2 config files in /etc/apache2/sites-available(one gitlab , 1 seafile). each service runs themselves . if enable other config, there occurs 404 error.the apache redirects me https://seafile.mlnet.de http://seafile.mlnet.de/users/sign_in (<-- /users/sign_in default gitlab login page).i don´t know cause of forwarding port 80 . if enable only seafile , can access login page(domain.de/accounts/login/?next=/) via gitlab subdomain. i grateful assistance. here apache config files: git_ssl.conf <virtualhost *:443> sslengine on sslciphersuite sslv3:tlsv1:+high:!sslv2:!md5:!medium:!low:!exp:!adh:!enull:!anull sslcertificatefile /etc/ssl/certs/apache.crt sslcertificatekeyfile /etc/ssl/private/apache.key servername gitlab.mlnet.de/ documentroot /opt/gitlab/embedded/service/gitlab-rails/public serversignature off proxypreservehost on allowencodedsla