Search Results

Search found 269 results on 11 pages for 'pp'.

Page 7/11 | < Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >

  • Looking for streaming xml pretty printer in C/C++ using expat or libxml2

    - by Mark Zeren
    I'm looking for a streaming xml pretty printer for C/C++ that's either self contained or that uses libxml2 or expat. I've searched a bit and not found one. It seems like something that would be generally useful. Am I missing an obvious tool that does this? Background: I have a library that outputs xml without whitespace all on one line. In some cases I'd like to pretty print that output. I'm looking for a BSD-ish licensed C/C++ library or sample code that will take a raw xml byte stream and pretty print it. Here's some pseudo code showing one way that I might use this functionality: void my_write(const char* buf, int len); PrettyPrinter pp(bind(&my_write)); while (...) { // ... get some more xml ... const char* buf = xmlSource.get_buf(); int len = xmlSource.get_buf_len(); int written = pp.write(buf, len); // calls my_write with pretty printed xml // ... error handling, maybe call write again, etc. ... } I'd like to avoid instantiating a DOM representation. I already have dependencies on the expat and libxml2 shared libraries, and I'd rather not add any more shared library dependencies.

    Read the article

  • XML-RPC over SSL with Ruby: end of file reached (EOFError)

    - by Michael Conigliaro
    Hello, I have some very simple Ruby code that is attempting to do XML-RPC over SSL: require 'xmlrpc/client' require 'pp' server = XMLRPC::Client.new2("https://%s:%d/" % [ 'api.ultradns.net', 8755 ]) pp server.call2('UDNS_OpenConnection', 'sponsor', 'username', 'password') The problem is that it always results in the following EOFError exception: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread': end of file reached (EOFError) So it appears that after doing the POST, I don't get anything back. Interestingly, this is the behavior I would expect if I tried to make an HTTP connection on the HTTPS port (or visa versa), and I actually do get the same exact exception if I change the protocol. Everything I've looked at indicates that using "https://" in the URL is enough to enable SSL, but I'm starting wonder if I've missed something. Note that Even though the credentials I'm using in the RPC are made up, I'm expecting to at least get back an XML error page (similar to if you access https://api.ultradns.net:8755/ with a web browser). I've tried running this code on OSX and Linux with the exact same result, so I have to conclude that I'm just doing something wrong here. Does anyone have any examples of doing XML-RPC over SSL with Ruby?

    Read the article

  • urllib2.Request() with data returns empty url

    - by Mr. Polywhirl
    My main concern is the function: getUrlAndHtml() If I manually build and append the query to the end of the uri, I can get the response.url(), but if I pass a dictionary as the request data, the url does not come back. Is there anyway to guarantee the redirected url? In my example below, if thisWorks = True I get back a url, but the returned url is the request url as opposed to a redirect link. On a sidenote, the encoding for .E2.80.93 does not translate to - for some reason? #!/usr/bin/python import pprint import urllib import urllib2 from bs4 import BeautifulSoup from sys import argv URL = 'http://en.wikipedia.org/w/index.php?' def yesOrNo(boolVal): return 'yes' if boolVal else 'no' def getTitleFromRaw(page): return page.strip().replace(' ', '_') def getUrlAndHtml(title, printable=False): thisWorks = False if thisWorks: query = 'title={:s}&printable={:s}'.format(title, yesOrNo(printable)) opener = urllib2.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] response = opener.open(URL + query) else: params = {'title':title,'printable':yesOrNo(printable)} data = urllib.urlencode(params) headers = {'User-agent':'Mozilla/5.0'}; request = urllib2.Request(URL, data, headers) response = urllib2.urlopen(request) return response.geturl(), response.read() def getSoup(html, name=None, attrs=None): soup = BeautifulSoup(html) if name is None: return None return soup.find(name, attrs) def setTitle(soup, newTitle): title = soup.find('div', {'id':'toctitle'}) h2 = title.find('h2') h2.contents[0].replaceWith('{:s} for {:s}'.format(h2.getText(), newTitle)) def updateLinks(soup, url): fragment = '#' for a in soup.findAll('a', href=True): a['href'] = a['href'].replace(fragment, url + fragment) def writeToFile(soup, filename='out.html', indentLevel=2): with open(filename, 'wt') as out: pp = pprint.PrettyPrinter(indent=indentLevel, stream=out) pp.pprint(soup) print('Wrote {:s} successfully.'.format(filename)) if __name__ == '__main__': def exitPgrm(): print('usage: {:s} "<PAGE>" <FILE>'.format(argv[0])) exit(0) if len(argv) == 2: help = argv[1] if help == '-h' or help == '--help': exitPgrm() if False:''' if not len(argv) == 3: exitPgrm() ''' page = 'Led Zeppelin' # argv[1] filename = 'test.html' # argv[2] title = getTitleFromRaw(page) url, html = getUrlAndHtml(title) soup = getSoup(html, 'div', {'id':'toc'}) setTitle(soup, page) updateLinks(soup, url) writeToFile(soup, filename)

    Read the article

  • streaming xml pretty printer in C/C++ using expat or libxml2?

    - by Mark Zeren
    I have a library that outputs xml without whitespace all on one line. In some cases I'd like to pretty print that output. I'm looking for a BSD-ish licensed C/C++ library or sample code that will take a raw xml byte stream and pretty print it. Here's some pseudo code showing one way that I might use this functionality: void my_write(const char* buf, int len); PrettyPrinter pp(bind(&my_write)); while (...) { // ... get some more xml ... const char* buf = xmlSource.get_buf(); int len = xmlSource.get_buf_len(); int written = pp.write(buf, len); // calls my_write with pretty printed xml // ... error handling, maybe call write again, etc. ... } I'd like to avoid instantiating a DOM representation. I already have dependencies on the expat and libxml2 shared libraries, and I'd rather not add any more shared library dependencies.

    Read the article

  • Run a perl script as a windows 7 service

    - by reptile
    I have a perl script which is compiled using pp, to be run as a windows service on windows 7 machines. I looked at the thread http://www.perlmonks.org/index.pl?node%5Fid=230377 but of little use because most of them weren't clear and the solutions suggested in that were to create executables and not actually for running as a windows 7 service. I tried putting my compiled exe in the scheduled tasks of windows but I think its not able to run for some reason. How do I debug this?

    Read the article

  • How do I use saz-sudo puppet module to deploy my own sudoers file with hiera?

    - by mr.zog
    I have saz-sudo installed and have created a site_sudo module based (I hope) on it. Here's what I have in my site_sudo/manifest/init.pp file: class { 'site_sudo': } sudo::conf { 'web': source => 'puppet:///files/etc/sudoers', } sudo::conf { 'syseng': priority => 10, content => "%sysadm ALL=(ALL) NOPASSWD: ALL", } include sudo No matter what I do, the sudoers file on the target is always overwritten with the sudoers.rhel6 file from saz-sudo module. I'm using common.yaml too: classes: - site_sudo

    Read the article

  • microsoft office has stopped working

    - by Tomasusa
    Every time I try to run MS Word,Excel, PP, OneNote (2007), it crashes. I get: microsoft office has stopped working.. Safe mode also doesn't run. I have windows server 2008 (32bits) and MS products used to work some time before. How to fix it?

    Read the article

  • Latency issues over internet

    - by Stevo
    I have a Media Temple server running http://www.popsapp.com which I am having latency issues with. If I run ab -n 100 -c 10 http://www.popsapp.com/ from my local machine I get very bad stats e.g.: Connection Times (ms) min mean[+/-sd] median max Connect: 179 3375 2185.4 2837 12525 Processing: 0 505 693.3 229 4564 Waiting: 0 50 115.4 0 415 Total: 964 3880 2094.5 3159 12608 Whereas if I run it from a rackspace server I have I get this: Connection Times (ms) min mean[+/-sd] median max Connect: 75 76 3.3 75 84 Processing: 235 339 81.4 315 579 Waiting: 159 249 61.7 234 411 Total: 311 415 82.0 390 663 To me this looks like intermediate network issues, but I wouldn't have thought it could be this bad! Any ideas how I can improve it? Here's the trace route traceroute to www.popsapp.com (216.70.105.183), 64 hops max, 52 byte packets 1 192.168.2.1 (192.168.2.1) 3.738 ms 0.953 ms 1.418 ms 2 host-92-22-112-1.as13285.net (92.22.112.1) 27.409 ms 97.093 ms 78.858 ms 3 host-78-151-225-141.static.as13285.net (78.151.225.141) 61.830 ms 170.484 ms 113.288 ms 4 host-78-151-225-80.static.as13285.net (78.151.225.80) 101.513 ms host-78-151-225-22.static.as13285.net (78.151.225.22) 64.718 ms 47.309 ms 5 xe-11-1-0-rt001.sov.as13285.net (62.24.240.14) 98.381 ms 114.424 ms xe-11-1-0-rt001.the.as13285.net (62.24.240.6) 96.592 ms 6 host-78-144-1-59.as13285.net (78.144.1.59) 36.799 ms host-78-144-1-63.as13285.net (78.144.1.63) 178.426 ms host-78-144-1-61.as13285.net (78.144.1.61) 85.516 ms 7 xe-10-0-0-scr010.thn.as13285.net (78.144.0.224) 88.158 ms host-78-144-0-207.as13285.net (78.144.0.207) 35.132 ms host-78-144-0-153.as13285.net (78.144.0.153) 121.464 ms 8 limelight-pp-thn.as13285.net (78.144.3.6) 46.987 ms limelight-pp-sov.as13285.net (78.144.5.18) 108.025 ms 40.169 ms 9 tge11-1.fr4.lga.llnw.net (69.28.172.149) 109.603 ms ve6.fr4.lon.llnw.net (68.142.88.221) 121.681 ms 38.609 ms 10 tge11-1.fr4.lga.llnw.net (69.28.172.149) 111.981 ms 113.744 ms 111.711 ms 11 tge8-2.fr4.iad.llnw.net (69.28.189.34) 117.102 ms ve5.fr4.iad.llnw.net (69.28.171.214) 184.372 ms 146.178 ms 12 cr02-1-1.iad1.net2ez.com (65.97.48.254) 182.880 ms net2ez.tge2-2.fr4.iad.llnw.net (69.28.156.170) 150.489 ms 121.862 ms 13 65.97.50.26 (65.97.50.26) 184.620 ms cr02-1-1.iad1.net2ez.com (65.97.48.254) 156.136 ms 131.963 ms 14 65.97.50.26 (65.97.50.26) 124.899 ms 126.537 ms 123.322 ms 15 e1.4.as02.iad01.mtsvc.net (70.32.64.246) 134.647 ms 186.307 ms 211.059 ms 16 popsapp.com (216.70.105.183) 118.876 ms 113.189 ms vzx258.mediatemple.net (216.70.104.17) 131.012 ms Looks to me like there is significant delay across the limelight network. This would explain why the traceroute via my rackspace server doesn't suffer from the same delay as they will be using their own trunk.

    Read the article

  • Placement of Variables in Puppet module

    - by Michael Duffy
    Hi guys; I've got a puppet module to setup several Gigaspaces PU's. Each of these have quite a few variables to be placed within the configuration file templates. We're also using several different environments so these variables are repeated several times to contain the values for each environment. My question is where the best place to store these variables would be? A class of their own, an external .pp I import, or something other?

    Read the article

  • Moving Powerpoint callout pointer

    - by masher
    How can I move the pointer (the diagonal line) in a callout in Powerpoint? I want the pointer at the textbox to point to the middle, not the upper third. I would post a pic, but I don't have enough reputation, look here instead. edit: I'm using PP 2003.

    Read the article

  • MySQL Query - Alternation of WHERE IN

    - by Sadiqur Rahman
    I have a mySQL query which takes 3-4 minutes to be executed. It is a large database. This query uses WHERE IN to find the rows.. So, is there any alternate query/clause/statement for my this query? SELECT r.reg_id, r.first_name, r.last_name, r.email, r.country, e.headline, e.industry, pp.photo FROM basic_registration r LEFT JOIN exp_ind_reg e ON e.reg_id=r.reg_id LEFT JOIN profile_photo pp ON pp.reg_id=r.reg_id WHERE r.reg_id IN (23,228,497,593,761,1204,1491,1894,1895,2128,7,11,20,22,25,26,27,29,31, 32,33,34,37,41,45,47,50,52,53,54,55,62,63,69,75,79,80,82,85,87,88,89,93,96,99, 102,104,106,110,116,117,124,139,143,146,150,157,159,161,162,170,175,176,177, 181,183,197,210,213,215,217,220,226,227,233,240,250,252,255,262,263,268,274,280, 283,285,290,300,312,313,317,324,332,341,347,351,357,368,369,372,373,377, 381,383,398,408,414,416,418,419,422,432,441,446,450,451,453,463,466,469,473,486,511, 522,525,527,529,534,538,541,543,546,564,566,569,577,579,581,585,586,595,598,599,600, 606,611,613,614,621,640,649,654,656,660,667,668,674,682,686,689,693,699,705,720, 734,742,748,753,763,774,775,780,782,784,792,795,804,839,841,862,871,890,929, 930,943,951,965,994,1004,1017,1026,1034,1050,1051,1053,1054,1067,1082,1087,1109, 1119,1121,1124,1136,1147,1187,1197,1214,1224,1226,1230,1241,1255,1318,1323,1358,1361, 1383,1404,1415,1429,1440,1443,1452,1458,1473,1478,1484,1490,1496,1505,1508,1521, 1534,1544,1556,1575,1628,1640,1644,1660,1688,1725,1791,1802,1815,1819,1849,1850,1891, 1896,1897,1911,1917,1923,1924,1926,1927,1930,1956,1959,1961,1967,1983,2006,2016, 2028,2053,2059,2088,2089,2100,2136,2145,2164,2183,2190,2219,2243,2291,2301,2321, 2343,2345,2423,2438,2465,2478,2501,2507,2508,2551,2563,2572,2629,2636,2642,2650, 2670,2693,2695,2724,2732,2801,2803,2839,2847,2867,2899,3024,3061,3068,3071,3093, 3123,3126,3188,3240,3273,3307,3308,3332,3484,3493,3522,3552,3596,3632,3705,3769, 3845,3869,3966,3969,4046,4066,4074,4077,4108,4113,4140,4198,4213,4218,4266,4295, 4312,4345,4365,4369,4380,4425,4453,4485,4486,4488,4493,4494,4495,4500,4513,4515, 4517,4520,4533,4540,4542,4544,4548,4550,4551,4554,4555,4557,4566,4567,4568, 4570,4572,4575,4586,4587,4590,4593,4594,4595,4598,4599,4608,4640,4642,4647,4650, 4661,4664,4679,4681,4685,4686,4698,4707,4708,4709,4711,4712,4714,4715,4717,4719, 4720,4721,4722,4724,4725,4728,4729,4732,4734,4735,4736,4737,4739,4742,4744,4745, 4750,4752,4754,4755,4757,4759,4760,4761,4763,4764,4766,4768,4770,4772,4774,4776, 4777,4789,4790,4791,4793,4795,4796,4797,4799,4803,4804,4805,4806,4808,4809,4811, 4814,4815,4817,4818,4821,4825,4826,4828,4830,4831,4833,4835,4836,4837,4843,4844, 4847,4848,4852,4853,4854,4861,4865,4866,4871,4874,4875,4876,4879,4880,4886,4889, 4890,4891,4892,4893,4894,4896,4899,4900,4904,4908,4914,4915,4916,4917,4918,4922, 4925,4929,4930,4931,4932,4934,4935,4940,4943,4944,4945,4947,4948,4949,4952,4953, 4956,4961,4963,4964,4965,4973,4974,4976,4978,4980,4985,4988,4989,4990,4993,4996, 5001,5009,5014,5016,5017,5018,5019,5021,5023,5024,5025,5028,5032,5033,5041,5042, 5048,5055,5056,5058,5059,5062,5065,5066,5072,5073,5075,5078,5079,5083,5084,5085, 5086,5087,5088,5089,5090,5091,5092,5093,5094,5096,5103,5112,5115,5116,5117,5123, 5125,5126,5127,5128,5130,5131,5132,5133,5134,5137,5138,5139,5140,5141,5146,5148, 5150,5155,5156,5158,5161,5162,5163,5164,5166,5168,5172,5174,5176,5178,5179,5180, 5181,5183,5186,5191,5194,5199,5200,5201,5202,5206,5214,5215,5217,5218,5222,5225, 5226,5227,5235,5236,5237,5243,5245,5246,5248,5251,5252,5254,5255,5256,5257, 5259,5261,5262,5267,5270,5271,5275,5279,5281,5283,5284,5286,5288,5289,5292,5293, 5295,5307,5308,5310,5311,5313,5315,5321,5323,5324,5325,5327,5328,5339,5340,5345, 5351,5353,5355,5356,5357,5358,5359,5363,5364,5365,5366,5369,5370,5371,5372,5373, 5376,5377,5378,5379,5381,5382,5383,5384,5385,5386,5387,5388,5389,5390,5393,5395, 5405,5406,5407,5411,5413,5414,5415,5416,5417,5418,5420,5424,5425,5429,5430,5431, 5432,5433,5434,5435,5437,5441,5451,5460,5467,5473,5476,5506,5524,5528,5530,5534, 5535,5536,5550,5551,5552,5553,5554,5556,5557,5559,5564,5565,5567,5568,5574,5575, 5585,5586,5587,5597,5600,5601,5605,5606,5607,5613,5614,5615,5617,5618,5624,5626, 5627,5628,5640,5643,5644,5645,5647,5648,5649,5650,5660,5661,5670,5671,5673,5674, 5675,5681,5683,5685,5689,5690,5691,5692,5693,5694,5695,5696,5697,5702,5703,5704, 5705,5706,5708,5710,5711,5712,5713,5716,5717,5719,5730,5732,5737,5744,5745,5746, 5748,5749,5750,5752,5753,5754,5756,5757,5758,5759,5761,5762,5763,5764,5765,5767, 5769,5770,5776,5780,5782,5783,5784,5787,5788,5789,5790,5791,5792,5793,5794,5799, 5802,5803,5804,5805,5806,5808,5809,5810,5812,5813,5814,5816,5817,5818,5822,5823,5826, 5827,5829,5830,5831,5848,5849,5850,5851,5852,5854,5856,5858,5859,5863,5864,5865, 5866,5867,5873,5884,5885,5893,5898,5899,5904,5907,5908,5910,5911,5915,5916,5918, 5919,5922,5923,5924,5933,5934,5941,5944,5950,5954,5955,5956,5960,5961,5973,5978,5981, 5982,5983,5984,5985,5986,5987,5988,5989,5990,5998,5999,6000,6002,6003,6004,6006, 6007,6010,6093,6175,6177,6217,6236,6325,6327,6347,6398,6403,6447,6582,6586,6609, 6697,6904,6926,6933,7001,7003,7047,7081,7094,7111,7205,7207,7219,7220,7221,7222, 7224,7227,7228,7229,7230,7232,7237,7238,7241,7268,7274,7275,7276,7281,7300,7307, 7309,7315,7330,7333,7334,7339,7343,7348,7354,7360,7374,7377,7378,7390,7429,7434, 7445,7448,7449,7452,7532,7534,7539,7542,7546,7547,7555,7563,7565,7567,7572,7575, 7576,7577,7578,7579,7585,7611,7907,7926,8100,8134,8205,8324,8337,8339,8350,8351, 8362,8410,8568,8572,8618,8619,8651,8665,8666,8667,8668,9010,9068,9098,9100,9106, 9111,9115,9121,9123,9174,9177,9272,9302,9421,9570,9683,9684,9697,9704,9712,9715,9779, 9790,9792,9793,9795,9798,9814,9818,9856,9866,9876,9886,9891,9908,9912,9928,10508, 10825,11103,11729,12289,12377,12643,12656,12657,12668,12876,12926,12958,13291, 13300,13408,13472,13976,14477,14538,14833,15044,15108,15779,16039,16061,16549, 16556,16562,16564,16565,16571,16573,16574,16576,16577,16584,16589,16590,16591, 16592,16598,16604,16606,16607,16610,16620,16645,16648,16650,16654,16655,16661, 16662,16675,16680,16697,16699,16701,16702,16704,16705,16708,16714,16719,16723, 16724,16727,16729,16731,16732,16743,16750,16752,16755,16758,16772,16774,16782,16787, 16793,16794,16795,16797,16798,16802,16813,16814,16815,16824,16825,16829,16831, 16841,16843,16848,16850,16863,16864,16866,16870,16878,16881,16887,16893,16896,16897, 16900,16902,16909,16912,16936,16944,16948,16958,16960,16963,16974,16978,16993,17012, 17016,17020,17053,17061,17096,17120,17124,17125,17129,17135,17137,17140,17141,17142, 17145,17149,17150,17157,17164,17170,17172,17173,17178,17180,17184,17187,17188, 17192,17196,17197,17200,17201,17206,17207,17221,17223,17227,17236,17244,17246, 17273,17285,17289,17291,17297,17300,17305,17310,17311,17321,17326,17331,17335, 17352,17370,17414,17423,17424,17439,17479,17493,17495,17501,17519,17525,17541, 17571,17590,17614,17755,17838,17846,17848,17852,17853,17855,17858,17861,17871, 17876,17877,17891,17896,17899,17900,17905,17908,17910,17911,17916,17917,17938,17939, 17940,17949,17953,17955,17960,17972,17980,17982,17992,18055,18067,18069,18071,18077, 18108,18127,18134,18136,18140,18142,18143,18158,18162,18178,18192,18196,18206,18217, 18221,18242,18245,18249,18263,18271,18273,18275,18277,18278,18286,18291,18295,18300, 18301,18308,18325,18333,18338,18360,18373,18374,18387,18397,18411,18412,18420,18429, 18434,18455,18478,18484,18534,18779,18790,18804,18821,18851,18964,18965,18977,18990, 18991,19000,19006,19276,19291,19374,19395,19416,19432,19627,19917,19927,19971,19974, 19989,20007,2254,2549,2652,3077,3615,4483,4484,4611,4700,5714,5772,6252,6536,7051, 7102,7107,7591,8167,8286,8935,9937,11089,12344,15830,16343,16644,17359, 17994,18774) AND r.activation=1 ORDER BY r.first_name ASC LIMIT 0, 10;

    Read the article

  • What You Said: Your Must Have Presentation Tools

    - by Jason Fitzpatrick
    Earlier this week we asked you to share your must have presentation tools and tricks; read on to see how your fellow readers jazz up their presentations and keep things flowing smoothly. Image by VectorOpenStock. Several readers favorites PowerPoint alternatives to break out of the PP doldrums. Kaitlin writes: Prezi.com An amazing tool! Enables you to create really dynamic zooming presentations, on one big canvas, with no slides! Wow-effect guaranteed. If you were reading down the comments thread and not quite sure if you wanted to check out Prezi, Dan’s passion for the presentation tool might push you over: How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • unrecognized selector sent to instance in xcode using objective c and sup as backend

    - by user1765037
    I am a beginner in native development.I made a project using xcode in objective C.It builded successfully.But when I run the project ,an error came like 'unrecognized selector sent to instance'.Why this is happening ?can anyone help me to solve this?I am attaching the error that I am getting with this.. And I am posting the code with this.... ConnectionController.m #import "ConnectionController.h" #import "SUPApplication.h" #import "Flight_DetailsFlightDB.h" #import "CallbackHandler.h" @interface ConnectionController() @property (nonatomic,retain)CallbackHandler *callbackhandler; @end @implementation ConnectionController @synthesize callbackhandler; static ConnectionController *appConnectionController; //Begin Application Setup +(void)beginApplicationSetup { if(!appConnectionController) { appConnectionController = [[[ConnectionController alloc]init]retain]; appConnectionController.callbackhandler = [[CallbackHandler getInstance]retain]; } if([SUPApplication connectionStatus] == SUPConnectionStatus_DISCONNECTED) [appConnectionController setupApplicationConnection]; else NSLog(@"Already Connected"); } -(BOOL)setupApplicationConnection { SUPApplication *app = [SUPApplication getInstance]; [app setApplicationIdentifier:@"HWC"]; [app setApplicationCallback:self.callbackhandler]; NSLog(@"inside setupApp"); SUPConnectionProperties *properties = [app connectionProperties]; NSLog(@"server"); [properties setServerName:@"sapecxxx.xxx.com"]; NSLog(@"inside setupAppser"); [properties setPortNumber:5001]; NSLog(@"inside setupApppot"); [properties setFarmId:@"0"]; NSLog(@"inside setupAppfarm"); [properties setUrlSuffix:@"/tm/?cid=%cid%"]; NSLog(@"inside setupAppurlsuff"); [properties setNetworkProtocol:@"http"]; SUPLoginCredentials *loginCred = [SUPLoginCredentials getInstance]; NSLog(@"inside setupAppmac"); [loginCred setUsername:@"mac"]; [loginCred setPassword:nil]; [properties setLoginCredentials:loginCred]; [properties setActivationCode:@"1234"]; if(![Flight_DetailsFlightDB databaseExists]) { [Flight_DetailsFlightDB createDatabase]; } SUPConnectionProfile *connprofile = [Flight_DetailsFlightDB getSynchronizationProfile]; [connprofile setNetworkProtocol:@"http"]; NSLog(@"inside setupAppPort2"); [connprofile setPortNumber:2480]; NSLog(@"inside setupAppser2"); [connprofile setServerName:@"sapecxxx.xxx.com"]; NSLog(@"inside setupAppdom2"); [connprofile setDomainName:@"Development"]; NSLog(@"inside setupAppuser"); [connprofile setUser:@"supAdmin"]; [connprofile setPassword:@"s3pAdmin"]; [connprofile setAsyncReplay:YES]; [connprofile setClientId:@"0"]; // [Flight_DetailsFlightDB beginOnlineLogin:@"supAdmin" password:@"s3pAdmin"]; [Flight_DetailsFlightDB registerCallbackHandler:self.callbackhandler]; [Flight_DetailsFlightDB setApplication:app]; if([SUPApplication connectionStatus] == SUPRegistrationStatus_REGISTERED) { [app startConnection:0]; } else { [app registerApplication:0]; } } @end ViewController.m #import "Demo_FlightsViewController.h" #import "ConnectionController.h" #import "Flight_DetailsFlightDB.h" #import "SUPObjectList.h" #import "Flight_DetailsSessionPersonalization.h" #import "Flight_DetailsFlight_MBO.h" #import "Flight_DetailsPersonalizationParameters.h" @interface Demo_FlightsViewController () @end @implementation Demo_FlightsViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } -(IBAction)Connect:(id)sender { @try { [ConnectionController beginApplicationSetup]; } @catch (NSException *exception) { NSLog(@"ConnectionAborted"); } // synchronise } -(IBAction)Synchronise:(id)sender { @try { [Flight_DetailsFlightDB synchronize]; NSLog(@"SYNCHRONISED"); } @catch (NSException *exception) { NSLog(@"Synchronisation Failed"); } } -(IBAction)findall:(id)sender { SUPObjectList *list = [Flight_DetailsSessionPersonalization findAll]; NSLog(@"no of lines got synchronised is %d",list.size); } -(IBAction)confirm:(id)sender { Flight_DetailsPersonalizationParameters *pp = [Flight_DetailsFlightDB getPersonalizationParameters]; MBOLogInfo(@"personalisation parmeter for airline id= %@",pp.Airline_PK); [pp setAirline_PK:@"AA"]; [pp save]; while([Flight_DetailsFlightDB hasPendingOperations]) { [NSThread sleepForTimeInterval:1]; } NSLog(@"inside confirm............"); [Flight_DetailsFlightDB beginSynchronize]; Flight_DetailsFlight_MBO *flight = nil; SUPObjectList *cl = nil; cl =[Flight_DetailsFlight_MBO findAll]; if(cl && cl.length > 0) { int i; for(i=0;i<cl.length;i++) { flight = [cl item:i]; if(flight) { NSLog(@"details are %@",flight.CITYFROM); } } } } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } @end SUPConnectionProfile.h #import "sybase_sup.h" #define FROM_IMPORT_THREAD TRUE #define FROM_APP_THREAD FALSE #define SUP_UL_MAX_CACHE_SIZE 10485760 @class SUPBooleanUtil; @class SUPNumberUtil; @class SUPStringList; @class SUPStringUtil; @class SUPPersistenceException; @class SUPLoginCertificate; @class SUPLoginCredentials; @class SUPConnectionProfile; /*! @class SUPConnectionProfile @abstract This class contains fields and methods needed to connect and authenticate to an SUP server. @discussion */ @interface SUPConnectionProfile : NSObject { SUPConnectionProfile* _syncProfile; SUPBoolean _threadLocal; SUPString _wrapperData; NSMutableDictionary* _delegate; SUPLoginCertificate* _certificate; SUPLoginCredentials* _credentials; int32_t _maxDbConnections; BOOL initTraceCalled; } /*! @method @abstract Return a new instance of SUPConnectionProfile. @discussion @result The SUPconnectionprofile object. */ + (SUPConnectionProfile*)getInstance; /*! @method @abstract Return a new instance of SUPConnectionProfile. @discussion This method is deprecated. use getInstance instead. @result The SUPconnectionprofile object. */ + (SUPConnectionProfile*)newInstance DEPRECATED_ATTRIBUTE NS_RETURNS_NON_RETAINED; - (SUPConnectionProfile*)init; /*! @property @abstract The sync profile. @discussion */ @property(readwrite, retain, nonatomic) SUPConnectionProfile* syncProfile; /*! @property @abstract The maximum number of active DB connections allowed @discussion Default value is 4, but can be changed by application developer. */ @property(readwrite, assign, nonatomic) int32_t maxDbConnections; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPString value for a given string. @discussion @param name The string. */ - (SUPString)getString:(SUPString)name; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPString value for a given string. If the value is not found, returns 'defaultValue'. @discussion @param name The string. @param defaultValue The default Value. */ - (SUPString)getStringWithDefault:(SUPString)name:(SUPString)defaultValue; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPBoolean value for a given string. @discussion @param name The string. */ - (SUPBoolean)getBoolean:(SUPString)name; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPBoolean value for a given string. If the value is not found, returns 'defaultValue'. @discussion @param name The string. @param defaultValue The default Value. */ - (SUPBoolean)getBooleanWithDefault:(SUPString)name:(SUPBoolean)defaultValue; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPInt value for a given string. @discussion @param name The string. */ - (SUPInt)getInt:(SUPString)name; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPInt value for a given string. If the value is not found, returns 'defaultValue'. @discussion @param name The string. @param defaultValue The default Value. */ - (SUPInt)getIntWithDefault:(SUPString)name:(SUPInt)defaultValue; /*! @method getUPA @abstract retrieve upa from profile @discussion if it is in profile's dictionary, it returns value for key "upa"; if it is not found in profile, it composes the upa value from base64 encoding of username:password; and also inserts it into profile's dictionary. @param none @result return string value of upa. */ - (SUPString)getUPA; /*! @method @abstract Sets the SUPString 'value' for the given 'name'. @discussion @param name The name. @param value The value. */ - (void)setString:(SUPString)name:(SUPString)value; /*! @method @abstract Sets the SUPBoolean 'value' for the given 'name'. @discussion @param name The name. @param value The value. */ - (void)setBoolean:(SUPString)name:(SUPBoolean)value; /*! @method @abstract Sets the SUPInt 'value' for the given 'name'. @discussion @param name The name. @param value The value. */ - (void)setInt:(SUPString)name:(SUPInt)value; /*! @method @abstract Sets the username. @discussion @param value The value. */ - (void)setUser:(SUPString)value; /*! @method @abstract Sets the password. @discussion @param value The value. */ - (void)setPassword:(SUPString)value; /*! @method @abstract Sets the ClientId. @discussion @param value The value. */ - (void)setClientId:(SUPString)value; /*! @method @abstract Returns the databasename. @discussion @param value The value. */ - (SUPString)databaseName; /*! @method @abstract Sets the databasename. @discussion @param value The value. */ - (void)setDatabaseName:(SUPString)value; @property(readwrite,copy, nonatomic) SUPString databaseName; /*! @method @abstract Gets the encryption key. @discussion @result The encryption key. */ - (SUPString)getEncryptionKey; /*! @method @abstract Sets the encryption key. @discussion @param value The value. */ - (void)setEncryptionKey:(SUPString)value; @property(readwrite,copy, nonatomic) SUPString encryptionKey; /*! @property @abstract The authentication credentials (username/password or certificate) for this profile. @discussion */ @property(retain,readwrite,nonatomic) SUPLoginCredentials *credentials; /*! @property @abstract The authentication certificate. @discussion If this is not null, certificate will be used for authentication. If this is null, credentials property (username/password) will be used. */ @property(readwrite,retain,nonatomic) SUPLoginCertificate *certificate; @property(readwrite, assign, nonatomic) BOOL initTraceCalled; /*! @method @abstract Gets the UltraLite collation creation parameter @discussion @result conllation string */ - (SUPString)getCollation; /*! @method @abstract Sets the UltraLite collation creation parameter @discussion @param value The value. */ - (void)setCollation:(SUPString)value; @property(readwrite,copy, nonatomic) SUPString collation; /*! @method @abstract Gets the maximum cache size in bytes; the default value for iOS is 10485760 (10 MB). @discussion @result max cache size */ - (int)getCacheSize; /*! @method @abstract Sets the maximum cache size in bytes. @discussion For Ultralite, passes the cache_max_size property into the connection parameters for DB connections; For SQLite, executes the "PRAGMA cache_size" statement when a connection is opened. @param cacheSize value */ - (void)setCacheSize:(int)cacheSize; @property(readwrite,assign, nonatomic) int cacheSize; /*! @method @abstract Returns the user. @discussion @result The username. */ - (SUPString)getUser; /*! @method @abstract Returns the password hash value. @discussion @result The password hash value. */ - (NSUInteger)getPasswordHash; /*! @method @abstract Returns the password. @discussion @result The password hash value. */ - (NSString*)getPassword; /*! @method @abstract Adds a new key value pair. @discussion @param key The key. @param value The value. */ - (void)add:(SUPString)key:(SUPString)value; /*! @method @abstract Removes the key. @discussion @param key The key to remove. */ - (void)remove:(SUPString)key; - (void)clear; /*! @method @abstract Returns a boolean indicating if the key is present. @discussion @param key The key. @result The result indicating if the key is present. */ - (SUPBoolean)containsKey:(SUPString)key; /*! @method @abstract Returns the item for the given key. @discussion @param key The key. @result The item. */ - (SUPString)item:(SUPString)key; /*! @method @abstract Returns the list of keys. @discussion @result The keylist. */ - (SUPStringList*)keys; /*! @method @abstract Returns the list of values. @discussion @result The value list. */ - (SUPStringList*)values; /*! @method @abstract Returns the internal map of key value pairs. @discussion @result The NSMutableDictionary with key value pairs. */ - (NSMutableDictionary*)internalMap; /*! @method @abstract Returns the domain name. @result The domain name. @discussion */ - (SUPString)getDomainName; /*! @method @abstract Sets the domain name. @param value The domain name. @discussion */ - (void)setDomainName:(SUPString)value; /*! @method @abstract Get async operation replay property. Default is true. @result YES : if ansync operation replay is enabled; NO: if async operation is disabled. @discussion */ - (BOOL) getAsyncReplay; /*! @method @abstract Set async operation replay property. Default is true. @result value: enable/disable async replay operation. @discussion */ - (void) setAsyncReplay:(BOOL) value; /*! @method @abstract enable or disable the trace in client object API. @param enable - YES: enable the trace; NO: disable the trace. @discussion */ - (void)enableTrace:(BOOL)enable; /*! @method @abstract enable or disable the trace with payload info in client object API. @param enable - YES: enable the trace; NO: disable the trace. @param withPayload = YES: show payload information; NO: not show payload information. @discussion */ - (void)enableTrace:(BOOL)enable withPayload:(BOOL)withPayload; /*! @method @abstract initialize trace levels from server configuration. @discussion */ - (void)initTrace; - (void)dealloc; /* ultralite/mobilink required parameters */ - (SUPString)getNetworkProtocol; - (void)setNetworkProtocol:(SUPString)protocol; - (SUPString)getNetworkStreamParams; - (void)setNetworkStreamParams:(SUPString)stream; - (SUPString)getServerName; - (void)setServerName:(SUPString)name; - (int)getPortNumber; - (void)setPortNumber:(int)port; - (int)getPageSize; - (void)setPageSize:(int)size; @end @interface SUPConnectionProfile(internal) - (void)applyPropertiesFromApplication; @end We are using SUP 2.1.3 library files.Please go through the code and help me...

    Read the article

  • ggplot2 heatmap : how to preserve the label order ?

    - by Tg
    I'm trying to plot heatmap in ggplot2 using csv data following casbon's solution in http://biostar.stackexchange.com/questions/921/how-to-draw-a-csv-data-file-as-a-heatmap-using-numpy-and-matplotlib the problem is x-label try to re-sort itself. For example, if I swap label COG0002 and COG0001 in that example data, the x-label still come out in sort order (cog0001, cog0002, cog0003.... cog0008). Is there anyway to prevent this ? I want to it to be ordered as in csv file thanks pp

    Read the article

  • Selecting Update queries alone from list of files using shell script

    - by Harish
    I am trying to get Update queries from a list of files using this script.I need to take lines containing "Update" alone and not "Updated" or "UpdateSQL"As we know all update queries contain set I am using that as well.But I need to remove cases like Updated and UpdatedSQL can anyone help? nawk -v file="$TEST" 'BEGIN{RS=";"} /[Uu][Pp][Dd][Aa][Tt][Ee] .*[sS][eE][tT]/{ gsub(/.*UPDATE/,"UPDATE");gsub(/.*Update/,"Update");gsub(/.*update/,"update");gsub(/\n+/,"");print file,"#",$0;} ' "$TEST" >> $OUT

    Read the article

  • PlaneProjection is not working well in silverlight

    - by vishal
    in silverlight project using name attribute in planeprojection gives Error 1 The type or namespace name 'PlaneProjection' could not be found (are you missing a using directive or an assembly reference?) code i used for that <Image Name="blabla.jpg" Height="200" Width="200" > <Image.Projection> <PlaneProjection Name="pp" /> </Image.Projection> </Image>

    Read the article

  • Cant use with clauses in find_by_sql

    - by PaulMurrayCbr
    Activerecord seems to be peeking at my sql and getting it wrong. I am finding that this: sql = " select etn.* from edittree_name etn where id = #{id}" Name.find_by_sql(sql) works, but this: sql = " with pp as ( select * from dual) select etn.* from edittree_name etn where id = #{id}" Name.find_by_sql(sql) Gives me a "undefined method `each' for 1:Fixnum". Any clues? Is there a "find_by_raw_sql (and don't try to understand it yourself)" method?

    Read the article

  • plesk update fails

    - by Caballero
    I have a dedicated server running CentOS 5.3. I'm trying to update Plesk 9.5.2 to version 10.0.0 but update fails. I do it with yum: yum update psa* --skip-broken -t but it fails and I get the errors at the end: Skip-broken could not solve problems Error: plesk-mail-pc-driver conflicts with psa-qmail Error: plesk-mail-pc-driver conflicts with psa-qmail-rblsmtpd Error: plesk-mail-qc-driver conflicts with plesk-mail-pc-driver Error: plesk-core conflicts with plesk-billing Error: Missing Dependency: sw-engine = 2.0 is needed by package plesk-billing-6.0.4-20090625.11.noarch (installed) Error: Missing Dependency: pp-sitebuilder >= 10.3.0 is needed by package psa-10.3.0-cos5.build1012110629.18.x86_64 (plesk) Error: plesk-mail-pc-driver conflicts with plesk-mail-qc-driver Is there a way that I could solve this?

    Read the article

  • Download HP Power Protector for ESXi

    - by Mark Henderson
    The HP PowerProtector user guide states that to install the HP PowerProtector client on an ESXi Host: Download the latest version of HPPP from the HP website (http://www.hp.com/go/rackandpower). The ESXi Server is automatically detected, and a shutdown command script is generated. However in typical HP fashion, after clicking through no less than 6 different links to get to the downloads page, I am presented with: http://h18004.www1.hp.com/products/servers/proliantstorage/power-protection/software/power-protector/pp-dl.html HP Power Protector (HPPP) - Windows HP Power Protector (HPPP) - Linux x86 HP Power Protector (HPPP) - Linux x64 HP Power Protector (HPPP) - Linux IA64 HP Power Protector (HPPP) - HPUX The Linux packages contain an RPM and in no way resemble what is in the HP documentation. None of these are labelled for ESXi. Does anyone know where or how to get the HP Power Protector ESXi client installed?

    Read the article

  • Microsoft Office 2013 Issue

    - by Liz
    A few days ago I opened my microsoft office programs and discovered taht they are missing the editing icons at the top, some of them will appear if you scroll over them, but not all. Also, in PowerPoint the slides show in the side window with a red "x" I have tried to uninstall and reinstall office 2013, but I have had no luck. This issue is in every office program (excel, PP, word, access, outlook, etc). I also can't see the text when I type. Its there, I can see it when I print the document, but nothing on the screen. Does anyone have a solution for this issue??

    Read the article

  • I can't run uwsgi as normal user

    - by atomAltera
    I want to run uwsgi server as www user, but if I write: uwsgi --socket $SOCKET --chmod-socket 666 --pidfile $PIDFILE --daemonize $LOGFILE --chdir $CHDIR --pp $PYTHONPATH --module main --post-buffering 8192 --workers 1 --threads 10 --uid www --gid www A socket creation error occurs: Log: 1 *** Starting uWSGI 1.4.1 (64bit) on [Mon Dec 10 22:15:23 2012] *** 2 compiled with version: 4.4.5 on 17 November 2012 23:31:14 3 os: Linux-2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 4 nodename: autoblog 5 machine: x86_64 6 clock source: unix 7 pcre jit disabled 8 detected number of CPU cores: 2 9 current working directory: / 10 writing pidfile to /tmp/uwsgi_mysite.pid 11 detected binary path: /usr/local/bin/uwsgi 12 setgid() to 1002 13 set additional group 1004 (files) 14 setuid() to 1002 15 *** WARNING: you are running uWSGI without its master process manager *** 16 your memory page size is 4096 bytes 17 detected max file descriptor number: 1024 18 lock engine: pthread robust mutexes 19 unlink(): Operation not permitted [core/socket.c line 109] 20 bind(): Address already in use [core/socket.c line 141]

    Read the article

  • Apache2 proxypass

    - by gatsby
    i'm trying to figure out why my apache2 reverse proxy doesn't work... hope someone can clarify. i'm using an apache server as a gateway with proxy pass: 10.184.1.2 is the IP. these are PP instructions i inserted in the 000-default config file. ProxyPass / http://192.168.102.31/ ProxyPassReverse / http://192.168.102.31/ the host 192.168.102.31 is an internal IP of a subnet wich is not reachable directly by clients, but only by the apache gateway. when i try to access such a address: http://apache_gateway_name/dir i see the client trying to reach 192.168.102.31 address and of course timeout occurs. can someone help? Best regards

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >