Posts

Showing posts from March, 2012

css - Hiding Content from Mobile (SEO) -

do think hiding particular content mobile version of website can harm seo? have page has around 3 long paragraphs of content. on desktop, looks fine - on mobile there far content before being able click categories on page. i've decided write media query hide first paragraph in section. google think i'm trying use black-hat techniques or understand content visible on mobile? thanks! the {display:none} tag within css para you're trying hide read google. question here lies whether consider after parsing media query. highly doubtful considering read "present" code , not read multiple instances of it, recorded spider data code on html page without considering ifs , buts of css & js. imo, should not penalised long content unique , you're not indulging in black-hat tactics.

import - Why am I getting this error with BCP? -

i want import table while keeping identity column. in cmd, enter: bcp database.edg.hello in c:\users\tech\downloads\p.csv -c -e - s349024ijfpok.windows.net\mssqlserver -t which returns: a valid table name required in, out or format options is issue syntax? you need brackets database information. use colon " path sure. complete command: bcp [database].[edg].[hello] in "c:\users\tech\downloads\p.csv" -c -e -s 349024ijfpok.windows.net\mssqlserver -t

Custom hover-effect for WPF button with strange behaviour -

i have simple button containing image: <button x:name="helpbtn" width="25" style="{staticresource hoverbutton}" template="{staticresource hoverbuttontemplate}" click="onhelpbuttonclicked" tooltip="{x:static resx:language.helpbutton}" height="25" borderthickness="0" canvas.top="2" canvas.right="52" canvas.left="-77"> <image x:name="helpimg" source="resources/2_help.png" width="6" height="10" stretch="uniform"/> </button> then have contenttemplate: <controltemplate x:key="hoverbuttontemplate" targettype="{x:type button}"> <grid> <contentpresenter content="{templatebinding button.content}" /> <rectangle x:name="hoverrect2" fill="darkgreen" visibility="hidden" opacity="0

html - Should I use px or rem value units in my CSS? -

i designing new website , want compatible browsers , browser settings possible. trying decide unit of measurement should use sizes of fonts , elements, unable find conclusive answer. my question is: should use px or rem in css? so far know using px isn't compatible users adjust base font size in browser. i've disregarded em s because more of hassle maintain, compared rem s, cascade. some rem s resolution independent , therefore more desirable. others modern browsers zoom elements equally anyway, using px not problem. i'm asking because there lot of different opinions desirable measure of distance in css, , not sure best. tl;dr: use px . the facts first, it's extremely important know per spec , css px unit does not equal 1 physical display pixel. has always been true – in 1996 css 1 spec . css defines reference pixel , measures size of pixel on 96 dpi display. on display has dpi substantially different 96dpi (like retina displays),

Is java array with an element null is of length 1? -

below code: int[][][] @ = { {{9, 4}, null}, {null}, {{1, 2, 3}} }; system.out.println(at.length + " " + at[1].length); // 3 1 shows at[1].length 1 . is not that, length counted when have element of type int[][] @ second index in object pointed at ? if yes, why at[1] null of length 1? because null not of type int[][] similar example: mytype[] t = {null}; system.out.println(t.length); //1 for me t.length should 1 , when array has element {new mytype()} or element instance of subtype of mytype , like, mytype[] t = {new mytype()}; system.out.println(t.length); //1 yes. in fact, when declare , initialize array of object references, values inside null default. remember length of array never vary, despite contents ( null elements) in array. there's difference between length , size , length how many elements can stored in array, while size amount of valid elements in array. also, array is not list. example: string[] stringarray = {

httprequest - Sending a post in android with bad encoding -

i'm sending post content server android. problem data @ server arrives wrong, encoding problems, example "{" arrives "%7b%". this code android: requestparams params = new requestparams(); params.put("alta", "{s}"); string ruta = "http://www.something.com/receive"; client.post(ruta, params, new asynchttpresponsehandler() { @override public void onsuccess(string response) { } } the server part receiving data, like: $data = $this->request->data; $data =file_get_contents('php://input'); this issue not directly related text encoding per se. as can seen docs requestparams , text values directly included in url. text included in urls has encoded include characters allowed in urls (ascii), text url encoded . asynchttpclient automatically encoding in background, receive strings in encoded form on php side. in order original text sent, can use

javascript - Can I insert 3rd party marketing tags that use document.write() into Google Tag Manager (GTM)? -

i'm installing 3rd party marketing tags gtm (v2) container. tags real nuisance, making heavy use of document.write . though google tag manager claims support document.write , these tags throw javascript errors when fired. here's example of such tag. <script src="http://ib.adnxs.com/seg?add=1958353,6039160&t=1" type="text/javascript"> </script> this script seg?add=1958353,6039160&t=1 goes on call document.write twice: document.write('<scr'+'ipt type="text/javascript" src="https://js.b1js.com/tagcontainer.js?id=110386891486949186&type=1"></scr'+'ipt>'); document.write('<scr' + 'ipt src="http://cdn.adnxs.com/ib/async_usersync.js"></scr'+'ipt>'); if ask gtm support document.write tag, , set tag fire on pages, i'll error on page load: uncaught typeerror: cannot read property 'parentnode' of null uncaught #<o

escaping - Escape Characters Aren't Working In Debugger (C#) -

Image
i'm trying use escape characters print double quote. however, program throwing error i'm trying debug it. when add watch string using escape character shows backslash being included in string literal. how use escape characters \ doesn't become part of literal? you confused debugger's behavior. vs debugger show value escape character (ex: 4\" ) in watch section , on hovering but code use 4" in picture above, can notice it's shown escape character vs displays correctly in console.

java - Looping javaBean atributes -

i have java bean public class bean { private object field1; private object field2; public object getfield1() { return field1; } public void setfield1(object field1) { this.field1 = field1; } public object getfield2() { return field2; } public void setfield2(object field2) { this.field2 = field2; } } i want set fields i'm doing hardcoded bean c1 = new bean(); c1.setfield1(hmap.get(headers[1])); c1.setfield2(hmap.get(headers[2])); i cycle because have 17 fields. for (count = 1; count < headers.length; count++) { c1.setfield1,2,3...("parameter_" + count, messages.getstring("field." + headers[count]));} how can implement this? using jdk 16 using reflection , follows: bean c1 = new bean(); c1.setfield1("object 1"); c1.setfield2("object 2"); (int count = 1; count < headers.length; count++) { //concatenate method name string methodname = "getfield"

osx - SWIFT: NSURL Always either Nil or unusable -

so in swift app, have function selects folder/drive - want use nsurl string. however- when print nsurl comes "optional(file:///(stuff goes here)" when make string comes nil. there i'm doing wrong? code below @ibaction func selectdrive(sender: anyobject) { var openpanel = nsopenpanel() openpanel.allowsmultipleselection = false openpanel.canchoosedirectories = true openpanel.cancreatedirectories = true openpanel.canchoosefiles = false openpanel.beginwithcompletionhandler { (result) -> void in if result == nsfilehandlingpanelokbutton { println(openpanel.url) self.url = openpanel.url! var loc = string(contentsofurl: self.url) println("location @ \(loc)") // var str = string(system("diskutil info \(loc) | grep uuid:")) } } } i have following declared @ top var url = nsurl() @iboutlet weak var drivelabel: nstextfield! any appreciated. sp

c++ - Dynamic Programming : Timus Online Judge 1119 Metro -

i trying problem http://acm.timus.ru/problem.aspx?space=1&num=1119 on timus online judge. however, strange reason recursive function doesn't work. if print final value returned prints : "-nan". when print its's rounded form prints garbage value. #include <iostream> #include <cstring> #include <cmath> #define min(x,y) ((x<y) ? (x) : (y)) using namespace std; int x,y; float dp[1001][1001]; //for memoization bool d[1001][1001]; // storing whether diagonal movement possible or not float solve(int x,int y) { if (dp[x][y]!= -1.0) return dp[x][y]; if (x == 0 && y == 0) return (dp[x][y] = 0.0); if (x == 0 ) return (dp[x][y] = y*100); if (y == 0) return (dp[x][y] = x*100); float ret; float r1,r2,r3; r1 = 100.0 + solve(x-1,y); r2 = 100.0 + solve(x,y-1); ret = min(r1,r2); if (d[x][y]) { r3 = solve(x-1,y-1); r3 = r3 + 141.42; ret = min(r

Excel VBA update fill of cells based off of criteria -

my code in vba , updates value of cell based off of 2 criteria. i've commented code extensively, i'll paste below first. i've changed comments adding 2 more apostrophes make bit easier tell difference between comments , code on platform. sub highlightvalues() '''shortcut key: ctrl + w '''highlights values of corresponding left-most cell, if 2 conditions met: '''the part in "l" class , of rightmost cells empty dim ws worksheet dim long, lastrow long, lastcolumn long, c long, d long, j long, count long, k long, report long set ws = sheets("qap") lastrow = ws.cells(rows.count, 1).end(xlup).row lastcolumn = ws.cells(1, ws.columns.count).end(xltoleft).column '''searches column titles "analysis task count" '''where start searching filled boxes on each row = 1 lastrow if instr(ws.cells(1, i), "analysis task count") '''c number of column analysis

c++ - How can I see the output from printf's that are called from a DLL used by a Mex function in Matlab? -

i have mex code calls functions dll. dll has bunch of printf statements scattered around useful debugging. however, cannot see output in matlab command window. i've done reading , apparently because command windows not treated console application output printf can sent. have tried using link's solution no avail. have access source code of dll. compiling windows 7 in visual studio 2010. have tried using cout , works; however, not want rewrite of functions use cout. there can redirect output of printf matlab's command window? you need call setstdhandle before dll loads , initializes runtime library. can attach write end of pipe, , read other end. once runtime library initializes, have global data tied original stdout handle, , may not affected future calls setstdhandle .

java - Can I invoke some method from XML mapping file in Hibernate? -

i have xml mapping file. can invoke method it? idea: <?xml version="1.0" encoding="utf-8"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="pkg.someitem" table="item"> <id name="itemid" column="itemid" unsaved-value="0"> <generator class="increment"/> </id> <property name="filesize" invoke="myfilemanager.getactualfilesize(itemid);"/> </class> </hibernate-mapping> use reflection : // xml parsing code incorrect; illustration purposes string classname = xml.getelement("class").getattribute("name").getvalue(); string methodname = xml.getattribute("invoke").getvalue(); // generic insta

android - Mockito AbstractMethodError on initMocks -

so i've been struggling pretty day trying mockito work android project. added gradle build file: androidtestcompile 'org.mockito:mockito-core:2.0.29-beta' androidtestcompile "junit:junit:4.12-beta-3" androidtestcompile 'com.google.dexmaker:dexmaker:1.2' androidtestcompile 'com.google.dexmaker:dexmaker-mockito:1.2' and have tried running test doesn't anything: @runwith(mockitojunitrunner.class) public class loginactivitytest extends activityinstrumentationtestcase2<loginactivity> { private loginactivity loginactivity; private edittext et_email; private edittext et_password; private button btn_login; @mock spicemanager manager; public loginactivitytest(){ super(loginactivity.class); } @override public void setup() throws exception { super.setup(); loginactivity = getactivity(); mockitoannotations.initmocks(this); //manager = mock(spicemanage

linux - API compilation error on debian -

i need compile api test on debian, following error appears: root@beaglebone:~#sudo ./h264 uvc testap v1.0.14.0_h264 uvc testap multi your kernel version: 0x30813 testap support kernel version: 0x030244 testap didn't match current kernel version, please rebuild testap i follow these steps solve issue, , load compatible kernel version api: wget -c https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.2.tar.xz tar-xvjf linux-3.8.2.tar.xz cd linux-3.8.2 cp /boot/config-3.8.13-bone47.configblockquote afther error appears: cp: missing destination file operand after'/boot/config-3.8.13-bone47-config' any help?

What happens if a modifier is not specified in java? -

this question has answer here: what default access modifier in java? [duplicate] 13 answers class btnode { btnode left, right; int data; //constructors , methods } in piece of code no specific modifier used. happens in context of modifier? default behavior? from java docs: if class has no modifier (the default, known package-private), visible within own package (packages named groups of related classes) you can read here

java - Error while starting JBOSS Server? -

i facing strange problem while starting jboss server(without application deployed it). below application stacktrace. 19:36:33,178 info [org.jboss.modules] jboss modules version 1.1.2.ga-redhat-1 19:36:33,443 info [org.jboss.msc] jboss msc version 1.0.2.ga-redhat-1 19:36:33,490 info [org.jboss.as] jbas015899: jboss eap 6.0.0.ga (as 7.1.2.final-redhat-1) starting 19:36:33,880 error [org.jboss.as.server] jbas015956: caught exception during boot: org.jboss.as.controller.persistence.configurationpersistenceexception: jbas014676: failed parse configuration @ org.jboss.as.controller.persistence.xmlconfigurationpersister.load(xmlconfigurationpersister.java:141) [jboss-as-controller-7.1.2.final-redhat-1.jar:7.1.2.final-redhat-1] @ org.jboss.as.server.serverservice.boot(serverservice.java:270) [jboss-as-server-7.1.2.final-redhat-1.jar:7.1.2.final-redhat-1] @ org.jboss.as.controller.abstractcontrollerservice$1.run(abstractcontrollerservice.java:156) [jboss-

Expand only those pivot items with more than one entry (Excel VBA) -

ok, trying have excel vba code go through pivot table , expand out entries in last row field don't have 1 entry in them. default, last row field collapsed. what have far: sub test() activesheet.pivottables("objsummarypt") dim pvtitem4, pvtitem5 pivotitem each pvtitem4 in .rowfields("object code grouping").pivotitems each pvtitem5 in .rowfields("contract & contract title").pivotitems if pvtitem5.name <> "non-contract" , pvtitem4.recordcount > 0 , pvtitem5.recordcount > 0 .pivotfields("object code grouping").pivotitems(pvtitem4.name).showdetail = true end if next pvtitem5 next pvtitem4 end end sub this expands many of them, because isn't cross-referencing if there pvtitem5s in pvtitem4 have records, , not figuring out syntax so. i recognize single entries aren't listed "non-contract"

visual studio 2010 - How can I see all the interfaces a coclass implements in COM? -

specifically want see interfaces in mshtml library. can't decompile because it's written in native language if load dll or tlb file com interface viewer able see interfaces declares. com interfaces public don't need decompile designed read. there list here of type library viewers , or documentation mshtml online

Can CouchDB query_params in replication filter take an array? -

i've got replication filters working great in couchdb when parameter string. however, i'm wondering if i'm able send in array instead. example, existing, working filter takes query_param user , can populated value "tony". i'd like, able check multiple users, such query_params { "users": [ "laura", "tony" ] } i've tried in curl , {"error":"bad_request","reason":"invalid_json"} . i'm not sure invalid json is. the request via curl looks like: curl -h 'content-type: application/json' \ -x post http://example.com:5984/_replicate \ -d '{"source":"http://example.com:5984/db1","target":"http://example.com:5984/db2", "filter":"repfilter/users", "query_params":{"users":["laura","tony"]}' in filter code, check existence of document field us

Get list of tasks from windows task sheduler with python -

how can list of tasks in "/" folder of windows task scheduler? seems doesn't exist simple recipe. while searching i've found no suitable solution. have idea? upd: solved in such way: def parse_sheduler(root, tasks_to_check): # reads task sheduler list , returns dict tasks. taskexistsmark = true tasklist = subprocess.check_output(["schtasks.exe", "/fo", "csv"]) tasklist_dict = {} line in tasklist.splitlines()[1:]: if not line.startswith('"\\'): # skip not folder name starting lines continue folder = line.rsplit("\\", 1)[0][1:] taskname = line.rsplit("\\", 1)[1].split('"')[0] nextrun = line.rsplit("\\", 1)[1].split(",")[1].replace('"','') status = line.rsplit("\\", 1)[1].split(",")[2].replace('"','') if folder == "": folder = "\\" # print folder, ta

java - How to Determine if a String starts with exact number of zeros? -

how can know if string starts {n} number of leading zeros? example below, conditions return true real intention check if string starts 2 zeros. string str = "00063350449370" if (str.startswith("00")) { // true ... } you can like: if ( str.startswith("00") && ! str.startswith("000") ) { // .. } this make sure string starts "00", not longer string of zeros.

java - CXF generates WSDL where Fault extends tns:exception -

i have cxf fault class defined way: @webfault(name = "faultcontainer", faultbean = "myapi.transport.faultcontainer", targetnamespace = "mynmspace") public class servicefaultsecond extends java.lang.exception { ... } as can see, extends normal java exception. problem is, in wsdl generated cxf class represented way: <xs:complextype name="servicefaultsecond"> <xs:complexcontent> <xs:extension base="tns:exception"> <xs:sequence> <xs:element minoccurs="0" name="faultinfo" type="tns:faultcontainer"/> </xs:sequence> </xs:extension> </xs:complexcontent> </xs:complextype> here extends "tns:exception" (that extends tns:throwable). now, when try generate client, there compile errors - expects mynmspace.exception , mynmspace.throwable instead of java.lang... normally cxf not put xs:extension element wsdl, why h

javascript - Node serving blank page -

i have index.html page present at: d:\gitprojects\codelab\complete\step1\index.html i trying execute d:\gitprojects\codelab\complete\step1\server.js file via node: "c:\program files\nodejs>node.exe d:\gitprojects\codelab\complete\step1\server.js" server.js code: var static = require('node-static'); var http = require('http'); var file = new (static.server)("d:\gitprojects\codelab\complete\step1"); var app = http.createserver(function (req, res) { file.serve(req, res); }).listen(2011); when go hit: http://localhost:2011/ see empty page. idea why? the console shows " http://localhost:2011/ failed load resource: server responded status of 404 (not found)" you need keep file.serve(req,res) within req.addlistener() var static = require('node-static'); var http = require('http'); var file = new (static.server)("./"); var app = http.createserver(function (req, res) { req.addlistener(&

c# - How to find PlaceHolder controls from User Control -

i have 2 usercontrol name called uc_1 & uc_2. in uc_1 have 1 placeholder. refer placeholder uc_2. i tried below codes getting null error: string usercontrolname = "uc_1.ascx"; system.web.ui.usercontrol usercontrol = null; placeholder objplaceholder = ((timereportuc)page.findcontrol("placeholderid")).findcontrol("placeholderid") placeholder; usercontrol = (system.web.ui.usercontrol)page.loadcontrol(usercontrolname); objplaceholder.controls.add(usercontrol);

vba - search for emails with specific subject title IF UNREAD and save attachments into folder -

i using following vba code should search emails specific subject title i.e. subject 'test' then if email unread save attachment email folder. there may 1 or several emails subject test want unread emails subject test have attachments saved folder. here code: sub work_with_outlook() set olapp = createobject("outlook.application") dim olns outlook.namespace dim fldr outlook.mapifolder dim myitem object dim myattachment outlook.attachment dim long dim olmail variant set olapp = new outlook.application set olns = olapp.getnamespace("mapi") set fldr = olns.getdefaultfolder(olfolderinbox) set mytasks = fldr.items set unread = mytasks.restrict("[unread] = false") set olmail = mytasks.find("[subject] = ""test""") if not (olmail nothing) , unread.count = 0 each myitem in mytasks if myitem.attachments.count <> 0 each mya

javascript - Angular Js : {{message}} is not replaced by some text -

below simple example trying implement controller. {{8/2}} giving correct output i.e. 4 {{message}} remains same. it should replaced value e.g. first controller i downloaded angular js https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js html <!doctype html> <html ng-app> <head> <script src="angular.js"></script> <link rel="stylesheet" href="style.css" /> <script src="script.js"></script> </head> <body> <h1>{{8/2}}</h1> <div ng-controller="homecontroller"> {{message}} </div> </body> </html> script.js var homecontroller = function($scope) { $scope.message = "first controller"; }; i downloaded angular js https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js well angularjs version 1.4x not support raw functions controllers used controllers. ch

Coniditional execution of the form by php -

i conditionally execute form. i mean, "if something" code written , executed <form action="aaaa.php"> . "else" , there <form action="bbb.php"> , again executed. execution and, of course, validation (or rewriting action="" ) done automatically when user press send button. is possible php? would know how make this? thanks lot yes. possible. try - <form action="<?php echo (something) ? 'aaaa.php' : 'bbb.php';?>" > check here

html5 - pfbc checkbox all options required -

i using pfbc checkbox, , want make options have attribute required, html5 validation. following code sent pfbc rendering, doesn't add 'required' attribute: array ( 'name' => 'agreements', 'label' => '', 'type' => 'checkbox', 'options' => array('over_18'=>'i on 18 years of', 'understand_risks'=>'i understand risks', 'properties'=> array ( 'required' => array('over_18','understand_risks') ) ), i have found answer in forum. fix needed in pfbc/element/checkbox.php, removing 'required' option below. after html5 validation checkboxes works charm! --- a/pfbc/element/checkbox.php +++ b/pfbc/element/checkbox.php @@ -24,7 +24,7 @@ class element_checkbox extends o

javascript - AdminLTE - Loading different content for each menu item -

i'm using adminlte build admin page, , i'm trying understand how load (with jquery) different snippets of code each link click to. for example: in sidebar menu have 1, 2, 3, 4. when link on 1, snippet appears in content div, , same others... could give me hints? jquery load friend! attach handle link click event , work. examples on jquery-page pretty straightforward. see this question on stackoverflow.

Passing wav file samples through socket in c -

i'm (unsuccessfully) trying pass .wav file through socket in c. the following code reads .wav file , assigns short samples variable (num_samples being size). char* filename = "./test.wav"; file* f; short* samples; // stored signal int num_samples, curr_samples; // count of signal samples if ((f = fopen(filename, "rb")) == null) { fprintf(stderr, "cannot open %s\n", filename); return; } /* reads .wav file memory (samples) */ if (read_wav(f, &samples, &num_samples) < 0) { return; } fclose(f); then, samples loaded iteratively buffers , passed through socket int buffer_size = 320; unsigned char buffer[buffer_size]; short buffersamples[buffer_size/2]; int curr_samples = 0; while(curr_samples < num_samples) { bzero(buffer,buffer_size); bzero(buffersamples,buffer_size/2); // store samples in short array (i = curr_samples; < buffer_size/2 + curr_samples; i++) { buffersamples[i-curr_samples] = *(samples + i);

jasper reports - JasperReports java.sql.SQLException: No database selected -

i have continue development of web app , found error don't know how fix it. when click generate pdf, calls following function: public void crearpdf(integer idproyecto, usuarios usuario, string email, boolean archivodoc, locale locale) throws sqlexception { system.err.println("entrando en crearpdf"); //string ruta = "\\\\server\\producción\\pdfapp\\" + usuario.getnombre() + "\\"; string ruta = "/home/pdfapp/" + usuario.getnombre() + "/"; integer versionproyecto; file rutafile = new file(ruta); jrpdfexporter exp = new jrpdfexporter(); jrpdfexporter exp2 = new jrpdfexporter(); jrdocxexporter expd = new jrdocxexporter(); connection conn = null; if(!rutafile.exists()){ rutafile.mkdirs(); } mailutil mutil = new mailutil(); string nombreproyecto; facescontext context = facescontext.getcurrentinstance(

xamarin.forms - How to make a behaviors collection a resource in XAML -

how make behaviors collection resource in xaml using xamarin.forms? i tried following: xmlns:b="clr-namespace:xamarin.behaviors;assembly=xamarin.behaviors" xmlns:behaviors="clr-namespace:viewoptions.behaviors;assembly=viewoptions" . . <contentpage.resources> <resourcedictionary> <b:behaviorcollection x:key="behaviorcollection"> <behaviors:textboxfocusbehavior /> </b:behaviorcollection> </resourcedictionary> </contentpage.resources> here's behavior: namespace viewoptions.behaviors { public class textboxfocusbehavior : behavior<entry> { protected override void onattachedto(entry entry) { } protected override void ondetachingfrom(entry bindable) { } } } the implementation gives me runtime exception. any suggestions?

java - OSGI org.slf4j.impl dependency -

i'm new osgi (sorry) , having few issues trying deploy package , related dependencies. this pom: <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.felix.test</groupid> <artifactid>com.felix.test</artifactid> <version>1.0-snapshot</version> <packaging>bundle</packaging> <dependencies> <dependency> <groupid>org.apache.felix</groupid> <artifactid>org.osgi.core</artifactid> <version>1.0.0</version> <scope>provided</scope> </dependency> <de

sublimetext2 - How to reset key binding settings in sublime text 2? -

be freshman sublime text 2, changed hotkeys in "key binding - default", know should use "key binding - user", question how restore default key settings manually? need run compare on default settings leave changed lines user key settings. if changed default file in sublime , saved it, you'll need reinstall sublime in order original - why shouldn't that. i'd recommend upgrading sublime text 3 , has many new features , bug fixes on st2 (which not being developed @ now), , has been rock-stable 2 years or more. in addition sorts of other benefits, st3 not allow edit default files.

How to capture username in gmail during runtime in selenium? -

i have scenario navigate gmail login page. i want username editbox capture username during runtime. is possible in selenium? getattribute(string str) in webelement should work.

mongodb - Mongoose Caching a Part of a Referenced Subdoc on Creation -

i have simple schema references. dont want populate referenced document on every query. instead want cache part (only single attribute) on referencing document. a simple example schema: user - displayname (....stuff....) posts - title - content - user (reference?) when used references , population on demand postschema like: var postschema = new schema({ ... user: { type: schema.objectid, ref: 'user' } }) but want save (cache) only displayname (not other stuff in user) , _id in post when created . thougts on change postschema following: user: { _id: { type: schema.objectid, ref: 'user' }, displayname: string } on creation of post do: var post = new post(req.body); post.user._id = req.user._id; post.user.displayname = req.user.displayname; the problem is: looks _id is referenced user, leading absurd user._id._id. iscreator-middleware needs convert _id string: exports.i

dirname() has been disabled for security reasons -

i use mail form formtoemailpro.php , have done years , on multiple sites without problem. 1 client uses private server , owner has configured server not run script because contains dirname . dirname() has been disabled security reasons i have not come across before , te major hosting companies run script without problem, should concerned about.

ios - Cocoapods : Library Not found -

Image
i trying run cocoapods project , getting following error i tried pod deintegrate , pod install it's still there. tried removing pod.debug.xcconfig file project->info->configuration , pod install nothing. pod.debug.xcconfig generated pod install contain path ${pods_root}/headers/public/attributedmarkdown but can't find 'headers/public' in project navigator first line of defense : (quit xcode first, part of strategy) : rm -rf pods/ podfile.lock ; pod install defensive approach : verify podfile. coherent? how tools versions? happens if create new podfile pod init ? have targets expected? drastic measure : rebuild xcworkspace entirely: quit xcode mv project.xcworkspace backup location sudo gem install cocoapods (get latest) rm -rf pods/ podfile.lock ; pod install note: notice use of rm -rf pods/ podfile.lock ; pod install instead of pod update .