public JsonReadContext(com.fasterxml.jackson.core.json.JsonReadContext parent, com.fasterxml.jackson.core.json.DupDetector dups, int type, int lineNr, int colNr) : base() { // // // Configuration // // // Optional duplicate detection /* /********************************************************** /* Simple instance reuse slots; speeds up things /* a bit (10-15%) for docs with lots of small /* arrays/objects (for which allocation was /* visible in profile stack frames) /********************************************************** */ /* /********************************************************** /* Location/state information (minus source reference) /********************************************************** */ /* /********************************************************** /* Instance construction, config, reuse /********************************************************** */ _parent = parent; _dups = dups; _type = type; _lineNr = lineNr; _columnNr = colNr; _index = -1; }
public static bool areIntersecting(com.brashmonkey.spriter.SpriterRectangle rect1 , com.brashmonkey.spriter.SpriterRectangle rect2) { return rect1.isInisde(rect2.left, rect2.top) || rect1.isInisde(rect2.right, rect2 .top) || rect1.isInisde(rect2.left, rect2.bottom) || rect1.isInisde(rect2.right, rect2.bottom); }
public ActionResult ExportExWorkCalendar(string dateIndexTo, string dateIndex, DateTime? dateIndexDate, DateTime? dateIndexToDate, string productLine, com.Sconit.CodeMaster.TimeUnit dateType ) { com.Sconit.CodeMaster.ResourceGroup resourceGroup = com.Sconit.CodeMaster.ResourceGroup.EX; var table = _GetMrpWorkingCalendarView(dateIndexTo, dateIndex, dateIndexDate, dateIndexToDate, productLine, dateType, resourceGroup); return new DownloadFileActionResult(table, "ExWorkCalendar.xls"); }
protected internal TokenFilterContext(int type, com.fasterxml.jackson.core.filter.TokenFilterContext parent, com.fasterxml.jackson.core.filter.TokenFilter filter, bool startHandled ) : base() { /* /********************************************************** /* Simple instance reuse slots; speed up things /* a bit (10-15%) for docs with lots of small /* arrays/objects /********************************************************** */ /* /********************************************************** /* Location/state information /********************************************************** */ /* /********************************************************** /* Life-cycle /********************************************************** */ _type = type; _parent = parent; _filter = filter; _index = -1; _startHandled = startHandled; _needToHandleName = false; }
protected internal JsonWriteContext(int type, com.fasterxml.jackson.core.json.JsonWriteContext parent, com.fasterxml.jackson.core.json.DupDetector dups) : base() { // // // Return values for writeValue() // in root context // // // Optional duplicate detection /* /********************************************************** /* Simple instance reuse slots; speed up things /* a bit (10-15%) for docs with lots of small /* arrays/objects /********************************************************** */ /* /********************************************************** /* Location/state information (minus source reference) /********************************************************** */ /* /********************************************************** /* Life-cycle /********************************************************** */ _type = type; _parent = parent; _dups = dups; _index = -1; }
public override long Run(com.android.vending.billing.IMarketBillingService service) { Bundle request = makeRequestBundle("REQUEST_PURCHASE"); request.PutString(Consts.BILLING_REQUEST_ITEM_ID, mProductId); request.PutString(Consts.BILLING_REQUEST_ITEM_TYPE, mProductType); // Note that the developer payload is optional. if (mDeveloperPayload != null) { request.PutString(Consts.BILLING_REQUEST_DEVELOPER_PAYLOAD, mDeveloperPayload); } Bundle response = service.SendBillingRequest(request); PendingIntent pendingIntent = response.GetParcelable(Consts.BILLING_RESPONSE_PURCHASE_INTENT) as PendingIntent; if (pendingIntent == null) { Log.Error("BillingService", "Error with requestPurchase"); return Consts.BILLING_RESPONSE_INVALID_REQUEST_ID; } Intent intent = new Intent(); ResponseHandler.buyPageIntentResponse(pendingIntent, intent); return response.GetLong(Consts.BILLING_RESPONSE_REQUEST_ID, Consts.BILLING_RESPONSE_INVALID_REQUEST_ID); }
public void onDeleteRoomDone(com.shephertz.app42.gaming.multiplayer.client.events.RoomEvent roomEventObj) { if (roomEventObj.getData() != null) { Debug.WriteLine("onDeleteRoom " + roomEventObj.getData().getId() + " " + roomEventObj.getResult()); } }
public Spriter(com.discobeard.spriter.dom.SpriterData spriterData, com.brashmonkey.spriter.file.FileLoader loader, java.io.File scmlFile) { this.scmlFile = scmlFile; this.spriterData = spriterData; this.loader = loader; this.loadResources(); }
public JsonGeneratorImpl(com.fasterxml.jackson.core.io.IOContext ctxt, int features , com.fasterxml.jackson.core.ObjectCodec codec) : base(features, codec) { /* /********************************************************** /* Constants /********************************************************** */ /* /********************************************************** /* Configuration, basic I/O /********************************************************** */ /* /********************************************************** /* Configuration, output escaping /********************************************************** */ /* /********************************************************** /* Configuration, other /********************************************************** */ /* /********************************************************** /* Life-cycle /********************************************************** */ _ioContext = ctxt; if (isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature.ESCAPE_NON_ASCII)) { setHighestNonEscapedChar(127); } }
/// <summary> /// Internal translation for compiler level between exposed setting in C# and java /// </summary> /// <param name="options1"></param> /// <param name="options2"></param> private void configureCompileLevel(jsCompiler.Core.CompilerOptions options1, com.google.javascript.jscomp.CompilerOptions options2) { switch (options1.CompilerLevel) { case jsCompiler.Core.CompilerOptions.ECompilerLevel.WhiteSpaceOnly: { com.google.javascript.jscomp.CompilationLevel.WHITESPACE_ONLY.setOptionsForCompilationLevel(options2); break; } case jsCompiler.Core.CompilerOptions.ECompilerLevel.SimpleOptimization: { com.google.javascript.jscomp.CompilationLevel.SIMPLE_OPTIMIZATIONS.setOptionsForCompilationLevel(options2); break; } case jsCompiler.Core.CompilerOptions.ECompilerLevel.AdvancedOptimization: { com.google.javascript.jscomp.CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(options2); break; } default: { break; } } }
/// <summary>Draws the given player with its sprites.</summary> /// <remarks>Draws the given player with its sprites.</remarks> /// <param name="player">Player to draw.</param> public virtual void draw(com.brashmonkey.spriter.player.SpriterAbstractPlayer player ) { com.brashmonkey.spriter.draw.DrawInstruction[] instructions = player.getDrawInstructions (); for (int i = 0; i < player.getObjectsToDraw(); i++) { if (instructions[i].obj.isVisible()) { this.draw(instructions[i]); } foreach (com.brashmonkey.spriter.player.SpriterAbstractPlayer pl in player.getAttachedPlayers ()) { if (player.getZIndex() == i) { draw(pl); pl.drawn = true; } } } foreach (com.brashmonkey.spriter.player.SpriterAbstractPlayer pl_1 in player.getAttachedPlayers ()) { if (!player.drawn) { draw(pl_1); } player.drawn = false; } }
public virtual void calcBoundingBox(com.brashmonkey.spriter.SpriterRectangle @base ) { this.boundingBox.set(@base); foreach (com.brashmonkey.spriter.objects.SpriterObject @object in this.childObjects) { com.brashmonkey.spriter.SpriterPoint[] points = @object.getBoundingBox(); this.boundingBox.left = System.Math.Min(System.Math.Min(System.Math.Min(System.Math .Min(points[0].x, points[1].x), points[2].x), points[3].x), this.boundingBox.left ); this.boundingBox.right = System.Math.Max(System.Math.Max(System.Math.Max(System.Math .Max(points[0].x, points[1].x), points[2].x), points[3].x), this.boundingBox.right ); this.boundingBox.top = System.Math.Max(System.Math.Max(System.Math.Max(System.Math .Max(points[0].y, points[1].y), points[2].y), points[3].y), this.boundingBox.top ); this.boundingBox.bottom = System.Math.Min(System.Math.Min(System.Math.Min(System.Math .Min(points[0].y, points[1].y), points[2].y), points[3].y), this.boundingBox.bottom ); } foreach (com.brashmonkey.spriter.objects.SpriterBone child in this.childBones) { child.calcBoundingBox(boundingBox); this.boundingBox.set(child.boundingBox); } }
/// <summary> /// Convert jsCompiler options to Google Closure Compiler options. /// </summary> /// <param name="options1"></param> /// <param name="options2"></param> private void configureDiagnosticGroups(jsCompiler.Core.CompilerOptions options1, com.google.javascript.jscomp.CompilerOptions options2) { // Set the compiler checks below tight... /* options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.MISSING_PROPERTIES, com.google.javascript.jscomp.CheckLevel.ERROR); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNDEFINED_VARIABLES, com.google.javascript.jscomp.CheckLevel.ERROR); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_TYPES, com.google.javascript.jscomp.CheckLevel.ERROR); */ options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.ACCESS_CONTROLS, getCheckLevel(options1.DiagnosticGroup.AccessControl)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.AMBIGUOUS_FUNCTION_DECL, getCheckLevel(options1.DiagnosticGroup.AmbiguousFunctionDeclaration)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_REGEXP, getCheckLevel(options1.DiagnosticGroup.CheckRegularExpression)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_TYPES, getCheckLevel(options1.DiagnosticGroup.CheckTypes)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_USELESS_CODE, getCheckLevel(options1.DiagnosticGroup.UselessCode)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CHECK_VARIABLES, getCheckLevel(options1.DiagnosticGroup.CheckVariables)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.CONSTANT_PROPERTY, getCheckLevel(options1.DiagnosticGroup.ConstantProperty)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.DEPRECATED, getCheckLevel(options1.DiagnosticGroup.Deprecated)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.DUPLICATE_MESSAGE, getCheckLevel(options1.DiagnosticGroup.DuplicateMessage)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.ES5_STRICT, getCheckLevel(options1.DiagnosticGroup.ES5Strict)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.EXTERNS_VALIDATION, getCheckLevel(options1.DiagnosticGroup.ExternsValidation)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.FILEOVERVIEW_JSDOC, getCheckLevel(options1.DiagnosticGroup.FileOverviewTags)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.GLOBAL_THIS, getCheckLevel(options1.DiagnosticGroup.GlobalThis)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.INTERNET_EXPLORER_CHECKS, getCheckLevel(options1.DiagnosticGroup.InternetExplorerChecks)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.INVALID_CASTS, getCheckLevel(options1.DiagnosticGroup.InvalidCasts)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.MISSING_PROPERTIES, getCheckLevel(options1.DiagnosticGroup.MissingProperties)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.NON_STANDARD_JSDOC, getCheckLevel(options1.DiagnosticGroup.NonStandard_JSDoc)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.STRICT_MODULE_DEP_CHECK, getCheckLevel(options1.DiagnosticGroup.StrictModuleDependencyCheck)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.TYPE_INVALIDATION, getCheckLevel(options1.DiagnosticGroup.TypeInvalidation)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNDEFINED_NAMES, getCheckLevel(options1.DiagnosticGroup.UndefinedNames)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNDEFINED_VARIABLES, getCheckLevel(options1.DiagnosticGroup.UndefinedVariables)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.UNKNOWN_DEFINES, getCheckLevel(options1.DiagnosticGroup.UnknownDefines)); options2.setWarningLevel(com.google.javascript.jscomp.DiagnosticGroups.VISIBILITY, getCheckLevel(options1.DiagnosticGroup.Visibility)); }
public virtual com.brashmonkey.spriter.animation.SpriterKeyFrame getNextFrameFor( com.brashmonkey.spriter.objects.SpriterAbstractObject @object, com.brashmonkey.spriter.animation.SpriterKeyFrame currentFrame, int direction) { com.brashmonkey.spriter.animation.SpriterKeyFrame nextFrame = null; int cnt = 0; bool isBone = @object is com.brashmonkey.spriter.objects.SpriterBone; for (int j = (currentFrame.getId() + direction + this.numberOfFrames()) % this.numberOfFrames(); nextFrame == null && cnt < this.numberOfFrames(); j = (j + direction + this.numberOfFrames()) % this.numberOfFrames(), cnt++) { com.brashmonkey.spriter.animation.SpriterKeyFrame frame = this.frames[j]; bool contains = (isBone) ? frame.containsBone((com.brashmonkey.spriter.objects.SpriterBone )@object) : frame.containsObject((com.brashmonkey.spriter.objects.SpriterObject) @object); if (contains) { com.brashmonkey.spriter.objects.SpriterAbstractObject objectInFrame; if(isBone) objectInFrame = frame.getBoneFor((com.brashmonkey.spriter.objects.SpriterBone)@object); else objectInFrame = frame.getObjectFor((com.brashmonkey.spriter.objects.SpriterObject)@object); if (@object.equals(objectInFrame)) { nextFrame = frame; } } } return nextFrame; }
public void setIcon( com.github.cadencii.java.awt.Icon value ) { if ( value == null ) { base.Image = null; } else { base.Image = value.image; } }
protected internal GeneratorBase(int features, com.fasterxml.jackson.core.ObjectCodec codec) : base() { // // // Constants for validation messages (since 2.6) /* /********************************************************** /* Configuration /********************************************************** */ /* /********************************************************** /* State /********************************************************** */ /* /********************************************************** /* Life-cycle /********************************************************** */ _features = features; _objectCodec = codec; com.fasterxml.jackson.core.json.DupDetector dups = com.fasterxml.jackson.core.JsonGenerator.Feature .STRICT_DUPLICATE_DETECTION.enabledIn(features) ? com.fasterxml.jackson.core.json.DupDetector .rootDetector(this) : null; _writeContext = com.fasterxml.jackson.core.json.JsonWriteContext.createRootContext (dups); _cfgNumbersAsStrings = com.fasterxml.jackson.core.JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS .enabledIn(features); }
/// <summary> /// Method that will construct a parser (possibly a sequence) that /// contains all given sub-parsers. /// </summary> /// <remarks> /// Method that will construct a parser (possibly a sequence) that /// contains all given sub-parsers. /// All parsers given are checked to see if they are sequences: and /// if so, they will be "flattened", that is, contained parsers are /// directly added in a new sequence instead of adding sequences /// within sequences. This is done to minimize delegation depth, /// ideally only having just a single level of delegation. /// </remarks> public static com.fasterxml.jackson.core.util.JsonParserSequence createFlattened( com.fasterxml.jackson.core.JsonParser first, com.fasterxml.jackson.core.JsonParser second) { if (!(first is com.fasterxml.jackson.core.util.JsonParserSequence || second is com.fasterxml.jackson.core.util.JsonParserSequence )) { // simple: return new com.fasterxml.jackson.core.util.JsonParserSequence(new com.fasterxml.jackson.core.JsonParser [] { first, second }); } Sharpen.AList<com.fasterxml.jackson.core.JsonParser> p = new Sharpen.AList<com.fasterxml.jackson.core.JsonParser >(); if (first is com.fasterxml.jackson.core.util.JsonParserSequence) { ((com.fasterxml.jackson.core.util.JsonParserSequence)first).addFlattenedActiveParsers (p); } else { p.Add(first); } if (second is com.fasterxml.jackson.core.util.JsonParserSequence) { ((com.fasterxml.jackson.core.util.JsonParserSequence)second).addFlattenedActiveParsers (p); } else { p.Add(second); } return new com.fasterxml.jackson.core.util.JsonParserSequence(Sharpen.Collections.ToArray (p, new com.fasterxml.jackson.core.JsonParser[p.Count])); }
public void OnMessage(com.sybase.afx.json.JsonMessage msg) { string _notification = msg.GetHeaders().GetNullableString("SUPObjCmd"); bool _reregistered = (_notification != null && _notification.Equals("reregister")); if(_reregistered) { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSubscriptionEnd(); return; } string method = msg.GetHeaders().GetString("method"); bool _isAsync = "asyncReplayCompleted".Equals(method); string serverRemoteId = msg.GetHeaders().GetNullableString("remoteId"); string clientRemoteId = GetRemoteId(); if(serverRemoteId != null && clientRemoteId != null && !serverRemoteId.Equals(clientRemoteId)) { return; } bool _isTcn = "tcn".Equals(method); if(!_isAsync && !_isTcn) { return; } com.sybase.afx.json.JsonObject _content = (com.sybase.afx.json.JsonObject)(msg.GetContent()); string userContext = _content.GetString("userContext"); string synchronizationGroup = _content.GetString("synchronizationGroup"); Sybase.Persistence.SynchronizationContext syncContext = new Sybase.Persistence.SynchronizationContext(); syncContext.UserContext = userContext; Sybase.Collections.GenericList<Sybase.Persistence.ISynchronizationGroup> sgs = new Sybase.Collections.GenericList<Sybase.Persistence.ISynchronizationGroup>(); foreach(string sg in com.sybase.afx.util.StringUtil.GetCommaSeparatedList(synchronizationGroup)) { sgs.Add(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetSynchronizationGroup(sg)); } if(_isTcn) { syncContext.Status = Sybase.Persistence.SynchronizationStatus.STARTING_ON_NOTIFICATION; } else { syncContext.Status = Sybase.Persistence.SynchronizationStatus.ASYNC_REPLAY_COMPLETED; } if(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSynchronize(sgs, syncContext) == Sybase.Persistence.SynchronizationAction.CANCEL) { return; } try { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.BeginSynchronize(sgs, userContext); } catch(Sybase.Persistence.SynchronizeException ex) { syncContext.Exception = ex; syncContext.Status = Sybase.Persistence.SynchronizationStatus.ERROR; YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSynchronize(sgs, syncContext); throw ex; } syncContext.Status = Sybase.Persistence.SynchronizationStatus.FINISHING; YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnSynchronize(sgs, syncContext); }
public bool loadAPIConfiguration(ref com.show.api.APISection customSection) { string configFile = System.IO.Path.Combine( Environment.CurrentDirectory, configFileName); if (!File.Exists(configFile)) { return false; } // Map the new configuration file. ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap(); configFileMap.ExeConfigFilename = configFile; // Get the configuration file. The file name has // this format appname.exe.config. // Get the mapped configuration file System.Configuration.Configuration config = ConfigurationManager.OpenMappedExeConfiguration( configFileMap, ConfigurationUserLevel.None); try { // Create a custom configuration section // having the same name that is used in the // roaming configuration file. // This is because the configuration section // can be overridden by lower-level // configuration files. // See the GetRoamingConfiguration() function in // this example. string sectionName = "apiSection"; if (config.Sections[sectionName] == null) { return false; } // Set console properties using values // stored in the configuration file. customSection = (com.show.api.APISection)config.GetSection(sectionName); } catch (ConfigurationErrorsException e) { Console.WriteLine("[Error exception: {0}]", e.ToString()); } // Display feedback. Console.WriteLine(); Console.WriteLine("Using OpenExeConfiguration(string)."); // Display the current configuration file path. Console.WriteLine("Configuration file is: {0}", config.FilePath); return true; }
public Result(com.google.javascript.jscomp.JSError[] par0, com.google.javascript.jscomp.JSError[] par1, global::java.lang.String par2, global::java.lang.Object par3, global::java.lang.Object par4, global::java.lang.Object par5, global::java.lang.Object par6, global::java.lang.Object par7, global::java.lang.String par8) : base(((global::net.sf.jni4net.jni.JNIEnv)(null))) { global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.ThreadEnv; using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 28)){ @__env.NewObject(global::com.google.javascript.jscomp.Result.staticClass, global::com.google.javascript.jscomp.Result.j4n__ctorResult13, this, global::net.sf.jni4net.utils.Convertor.ParArrayStrongCp2J(@__env, par0), global::net.sf.jni4net.utils.Convertor.ParArrayStrongCp2J(@__env, par1), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par2), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par3), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par4), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par5), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par6), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par7), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par8)); } }
public Spriter(string scmlPath, com.brashmonkey.spriter.file.FileLoader loader ) { this.scmlFile = new java.io.File(scmlPath); this.spriterData = com.brashmonkey.spriter.xml.SCMLReader.load(scmlPath); this.loader = loader; loadResources(); }
public virtual void OnQrScan (com.google.zxing.Result result) { var builder = new AlertDialog.Builder (this); builder.SetTitle ("QR Result"); builder.SetMessage (result.Text); using (var dlg = builder.Create ()) dlg.Show (); }
/// <param name="object">to compare with</param> /// <returns>true if both objects have the same id.</returns> public virtual bool equals(com.brashmonkey.spriter.objects.SpriterAbstractObject @object) { if (@object == null) { return false; } return this.timeline == @object.getTimeline(); }
public virtual void resolve(float x, float y, int chainLength, com.brashmonkey.spriter.objects.SpriterAbstractObject effector) { float xx = effector.getX() + (float)System.Math.Cos(SpriterCalculator.DegreeToRadian(effector .getAngle())) * SpriterCalculator.BONE_LENGTH * effector .getScaleX(); float yy = effector.getY() + (float)System.Math.Sin(SpriterCalculator.DegreeToRadian(effector .getAngle())) * SpriterCalculator.BONE_LENGTH * effector .getScaleX(); effector.setAngle(com.brashmonkey.spriter.SpriterCalculator.angleBetween(effector .getX(), effector.getY(), x, y)); if (this.player.getFlipX() == -1) { effector.setAngle(effector.getAngle() + 180f); } com.brashmonkey.spriter.objects.SpriterBone parent = null; if (effector.hasParent()) { parent = player.getRuntimeBones()[effector.getParentId()]; effector.copyValuesTo(temp); com.brashmonkey.spriter.SpriterCalculator.reTranslateRelative(parent, temp); if (effector is com.brashmonkey.spriter.objects.SpriterBone) { temp.copyValuesTo(player.lastFrame.getBones()[effector.getId()]); } else { temp.copyValuesTo(player.lastFrame.getObjects()[effector.getId()]); } } for (int i = 0; i < chainLength && parent != null; i++) { if (com.brashmonkey.spriter.SpriterCalculator.distanceBetween(xx, yy, x, y) <= 1) { return; } parent.setAngle(parent.getAngle() + com.brashmonkey.spriter.SpriterCalculator.angleDifference (com.brashmonkey.spriter.SpriterCalculator.angleBetween(parent.getX(), parent.getY (), x, y), com.brashmonkey.spriter.SpriterCalculator.angleBetween(parent.getX(), parent.getY(), xx, yy))); this.player.updateRecursively(parent); if (parent.hasParent()) { parent = player.getRuntimeBones()[parent.getParent().getId()]; } else { parent = null; } xx = effector.getX() + (float)System.Math.Cos(SpriterCalculator.DegreeToRadian(effector.getAngle ())) * SpriterCalculator.BONE_LENGTH * effector.getScaleX (); yy = effector.getY() + (float)System.Math.Sin(SpriterCalculator.DegreeToRadian(effector.getAngle ())) * SpriterCalculator.BONE_LENGTH * effector.getScaleX (); } }
internal static void Construct(com.esri.core.geometry.IntervalTreeImpl interval_tree, System.Collections.Generic.List<com.esri.core.geometry.Envelope1D> intervals) { interval_tree.StartConstruction(); for (int i = 0; i < intervals.Count; i++) { interval_tree.AddInterval(intervals[i]); } interval_tree.EndConstruction(); }
public MergedStream(com.fasterxml.jackson.core.io.IOContext ctxt, Sharpen.InputStream @in, byte[] buf, int start, int end) { _ctxt = ctxt; _in = @in; _b = buf; _ptr = start; _end = end; }
public RandomCoordinateGenerator(int count, com.esri.core.geometry.Envelope e, double tol) { env = e; maxlen = (env.GetWidth() + env.GetHeight()) / 2 * 0.1; points = new System.Collections.Generic.List<com.esri.core.geometry.Point>(); points.Capacity = count; tolerance = tol; maxcount = count; }
public Passenger(com.hotelbeds.distribution.hotel_api_sdk.helpers.RoomDetail.GuestType type, int age, string name, string surname, int roomId) { this.type = type; this.age = age; this.name = name; this.surname = surname; this.roomId = roomId; }
public override long Run(com.android.vending.billing.IMarketBillingService service) { Bundle request = makeRequestBundle("CONFIRM_NOTIFICATIONS"); request.PutStringArray(Consts.BILLING_REQUEST_NOTIFY_IDS, mNotifyIds); Bundle response = service.SendBillingRequest(request); logResponseCode("confirmNotifications", response); return response.GetLong(Consts.BILLING_RESPONSE_REQUEST_ID, Consts.BILLING_RESPONSE_INVALID_REQUEST_ID); }
public void onGetLiveUserInfoDone(com.shephertz.app42.gaming.multiplayer.client.events.LiveUserInfoEvent eventObj) { if (eventObj.getResult() == WarpResponseResultCode.SUCCESS) { // Join the room where the friend is playing GlobalContext.GameRoomId = eventObj.getLocationId(); WarpClient.GetInstance().JoinRoom(GlobalContext.GameRoomId); } }
static void Main(string[] args) { while (true) { int a, b; com c = new com(); Console.WriteLine("请输入要进行运算的两个数:"); string y = Console.ReadLine(); a = int.Parse(y); string z = Console.ReadLine(); b = int.Parse(z); Console.WriteLine("请输入运算规则:加法(1),减法(2),乘法(3),除法(4),字符串相加(5),字符串相减(6),退出(7)"); int i; string x = Console.ReadLine(); i = int.Parse(x); switch (i) { case 1: Console.WriteLine(a + "+" + b + "=" + c.jia(a, b)); break; case 2: Console.WriteLine(a + "-" + b + "=" + c.jian(a, b)); break; case 3: Console.WriteLine(a + "*" + b + "=" + c.cheng(a, b)); break; case 4: c.chu(a, b); break; case 5: Console.WriteLine("请依次输入两个字符串:"); string d = Console.ReadLine(); string f = Console.ReadLine(); Console.WriteLine(d + "+" + f + "=" + d + f); break; case 6: Console.WriteLine("请依次输入两个字符串:"); string j = Console.ReadLine(); string k = Console.ReadLine(); Regex r = new Regex(k); j = r.Replace(j, ""); Console.WriteLine(j + "-" + k + "=" + j); break; case 7: break; default: Console.WriteLine("输入有误,请重新输入"); break; } if (i == 7) { break; } } }
protected void Page_Load(object sender, EventArgs e) { del myDel = x => x * x; int j = myDel(5); com delCom = (string x, int y) => x.Length > y; bool isOk = delCom("123", 6); com1 delCom1 = () => 3 > 2; bool isOk1 = delCom1(); write1 delWrite1 = (string fg) => { string s = fg; string a = "欢迎 " + s; return(a); }; string re = delWrite1("aaa"); hello delHello = new hello(hello2); delHello += hello1; string bb = GetHello("liut", delHello); GetFunk(); }
static void Main() { Array a = new int [] { 4, 3, 2, 1 }; Console.WriteLine(a.IsFixedSize); //true Console.WriteLine(a.IsSynchronized); //false Console.WriteLine(a.Length); //4 Console.WriteLine(a.Rank); //1 Dimensional Console.WriteLine(Array.BinarySearch(a, 3)); //index of 3 is 2 ////////////////////////////////////////////// // Array.Clear(a,0,2); //clears the array from 0 to two elements // foreach(int i in a) // Console.WriteLine(i); ////////////////////////////////////////////// com c = new com(); Array.Sort(a, c); foreach (int i in a) { Console.WriteLine(i); } }
_serial = new SerialPort(com, port);
static void Main(string[] args) { string text = "бсиьбжгаоялплцкщдцаэглшнокжцкшгезогльнглщишияжлжгишкдгибжшксицкщгляябцерлкгэхицкъглскокшгкзихлояигдшазяокэкяжкхс"; string text1 = null; bool CH; int index = 0; ConsoleKeyInfo m = new ConsoleKeyInfo(); // string text_1=null; alfavit[] all = new alfavit[32]; alfavit[] mas = new alfavit[32]; mas[0] = new alfavit { name = 'а' }; mas[1] = new alfavit { name = 'б' }; mas[2] = new alfavit { name = 'в' }; mas[3] = new alfavit { name = 'г' }; mas[4] = new alfavit { name = 'д' }; mas[5] = new alfavit { name = 'е' }; mas[6] = new alfavit { name = 'ж' }; mas[7] = new alfavit { name = 'з' }; mas[8] = new alfavit { name = 'и' }; mas[9] = new alfavit { name = 'й' }; mas[10] = new alfavit { name = 'к' }; mas[11] = new alfavit { name = 'л' }; mas[12] = new alfavit { name = 'м' }; mas[13] = new alfavit { name = 'н' }; mas[14] = new alfavit { name = 'о' }; mas[15] = new alfavit { name = 'п' }; mas[16] = new alfavit { name = 'р' }; mas[17] = new alfavit { name = 'с' }; mas[18] = new alfavit { name = 'т' }; mas[19] = new alfavit { name = 'у' }; mas[20] = new alfavit { name = 'ф' }; mas[21] = new alfavit { name = 'х' }; mas[22] = new alfavit { name = 'ц' }; mas[23] = new alfavit { name = 'ч' }; mas[24] = new alfavit { name = 'ш' }; mas[25] = new alfavit { name = 'щ' }; mas[26] = new alfavit { name = 'ъ' }; mas[27] = new alfavit { name = 'ы' }; mas[28] = new alfavit { name = 'ь' }; mas[29] = new alfavit { name = 'э' }; mas[30] = new alfavit { name = 'ю' }; mas[31] = new alfavit { name = 'я' }; com[] slozno = new com[32]; slozno[0] = new com { name = 'о', value = 14 }; slozno[1] = new com { name = 'е', value = 5 }; slozno[2] = new com { name = 'а', value = 0 }; slozno[3] = new com { name = 'и', value = 8 }; slozno[4] = new com { name = 'т', value = 18 }; slozno[5] = new com { name = 'н', value = 13 }; slozno[6] = new com { name = 'с', value = 17 }; slozno[7] = new com { name = 'р', value = 16 }; slozno[8] = new com { name = 'в', value = 2 }; slozno[9] = new com { name = 'л', value = 11 }; slozno[10] = new com { name = 'к', value = 10 }; slozno[11] = new com { name = 'м', value = 12 }; slozno[12] = new com { name = 'д', value = 4 }; slozno[13] = new com { name = 'п', value = 15 }; slozno[14] = new com { name = 'у', value = 19 }; slozno[15] = new com { name = 'я', value = 21 }; slozno[16] = new com { name = 'ы', value = 27 }; slozno[17] = new com { name = 'з', value = 7 }; slozno[18] = new com { name = 'ь', value = 28 }; slozno[19] = new com { name = 'ъ', value = 26 }; slozno[20] = new com { name = 'б', value = 1 }; slozno[21] = new com { name = 'г', value = 3 }; slozno[22] = new com { name = 'ч', value = 23 }; slozno[23] = new com { name = 'й', value = 9 }; slozno[24] = new com { name = 'х', value = 21 }; slozno[25] = new com { name = 'ж', value = 6 }; slozno[26] = new com { name = 'ю', value = 30 }; slozno[27] = new com { name = 'ш', value = 24 }; slozno[28] = new com { name = 'ц', value = 22 }; slozno[29] = new com { name = 'щ', value = 25 }; slozno[30] = new com { name = 'э', value = 29 }; slozno[31] = new com { name = 'ф', value = 20 }; string[] iskl = new string[] { "йь", "ць", "уь", "кь", "еь", "гь", "оь", "щь", "зь", "хь", "ъь", "фь", "ыь", "аь", "жь", "эь", "яь", "иь", "ьь", "юь", "йъ", "цъ", "уъ", "къ", "еъ", "нъ", "гъ", "шъ", "щъ", "зъ", "хъ", "фъ", "ыъ", "аъ", "пъ", "ръ", "оъ", "лъ", "дъ", "жъ", "эъ", "яъ", "чъ", "мъ", "иъ", "ьъ", "юъ", "йы", "уы", "ке", "щы", "хы", "ъы", "аы", "оы", "эы", "яы", "иы", "ьы", "юы" }; for (int i = 0; i < text.Length; i++) { for (int j = 0; j < mas.Length; j++) { if (text[i] == mas[j].name) { mas[j].number++; break; } } } int a, d; int[] im = new int[4]; char b, c; for (int i = 0; i < mas.Length; i++) { all[i] = mas[i]; } for (int i = 0; i < all.Length; i++) { for (int j = i + 1; j < all.Length; j++) { if (all[i].number < all[j].number) { a = all[i].number; b = all[i].name; all[i] = all[j]; all[j].number = a; all[j].name = b; } } } for (int i = 0; i < all.Length / 2; i++) { Console.WriteLine("{" + all[i].name + "}" + "-" + all[i].number); } int alfa = 0, betta = 0; try { for (int k = 0; k < all.Length - 1; k++) { for (int i = 0; i < slozno.Length; i++) { for (int j = 0; j < slozno.Length; j++) { if (i == j) { continue; } for (int l = 0; l < mas.Length; l++) { if (all[k].name == mas[l].name) { alfa = l; } if (all[k + 1].name == mas[l].name) { betta = l; } } alfa = alfa - betta; if (alfa < 0) { alfa *= -1; } for (int q = 0; q < 32; q++) { if (q * alfa % 32 == 1) { alfa = q; break; } } a = slozno[i].value - slozno[j].value; if (alfa - betta < 0) { a *= -1; } alfa = ((32 + a) * alfa) % 32; a = 32; d = alfa; while (a != d) { if (a > d) { a -= d; } else { d -= a; } } betta = (slozno[j].value - (betta * alfa)) % 32; if (a != 1) { continue; } else { text1 = null; for (int w = 0; w < text.Length; w++) { for (int s = 0; s < 32; s++) { if (text[w] == mas[s].name) { if ((alfa * (s - betta)) < 0) { text1 += mas[((alfa * (s - betta)) * -1) % 32].name; } else { text1 += mas[(alfa * (s - betta)) % 32].name; } break; } } } for (int t = 0; t < iskl.Length; t++) { if ((text1.IndexOf(iskl[t])) != -1) { break; } if (t == iskl.Length - 1) { Console.WriteLine("a=" + alfa + " " + "b=" + betta); Console.WriteLine(text1); Console.WriteLine(k + " " + i + " " + j); } } } } } } } catch { Console.WriteLine("ITS ALL"); } }
Add(com, orbits);