text
stringlengths
4
6.14k
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: ../pdfreporter-extensions/src/org/oss/pdfreporter/uses/net/sourceforge/jeval/operator/BooleanOrOperator.java // #include "J2ObjC_header.h" #pragma push_macro("INCLUDE_ALL_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator") #ifdef RESTRICT_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator #define INCLUDE_ALL_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator 0 #else #define INCLUDE_ALL_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator 1 #endif #undef RESTRICT_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator #if !defined (OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator_) && (INCLUDE_ALL_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator || defined(INCLUDE_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator)) #define OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator_ #define RESTRICT_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorAbstractOperator 1 #define INCLUDE_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorAbstractOperator 1 #include "org/oss/pdfreporter/uses/net/sourceforge/jeval/operator/AbstractOperator.h" @interface OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator : OrgOssPdfreporterUsesNetSourceforgeJevalOperatorAbstractOperator #pragma mark Public - (instancetype)init; - (jdouble)evaluateWithDouble:(jdouble)leftOperand withDouble:(jdouble)rightOperand; @end J2OBJC_EMPTY_STATIC_INIT(OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator) FOUNDATION_EXPORT void OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator_init(OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator *self); FOUNDATION_EXPORT OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator *new_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator_init() NS_RETURNS_RETAINED; FOUNDATION_EXPORT OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator *create_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator_init(); J2OBJC_TYPE_LITERAL_HEADER(OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator) #endif #pragma pop_macro("INCLUDE_ALL_OrgOssPdfreporterUsesNetSourceforgeJevalOperatorBooleanOrOperator")
#ifndef CHESTNUT_WRITE_H #define CHESTNUT_WRITE_H #include "function.h" #include "datautils.h" /** * This object represents a write() function in Chestnut. It provides the * painting and chestnut code to implement writing a datablock or a value * out to a file. */ class Write : public Function { public: Write(QGraphicsObject* parent = 0); enum { Type = ChestnutItemType::Write }; int type() const; /** * @return the name of the file that will be written to */ QString filename() const; /** * Set the name of the file that will be written to */ void setFilename(const QString &fname); virtual ProgramStrings flatten() const; private: QString m_filename; }; #endif //CHESTNUT_WRITE_H
#include <gtk/gtk.h> static GtkWidget *window = NULL; /* Creates a tree model containing the completions */ GtkTreeModel * create_completion_model (void) { GtkListStore *store; GtkTreeIter iter; store = gtk_list_store_new (1, G_TYPE_STRING); /* Append one word */ gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "GNOME", -1); /* Append another word */ gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "total", -1); /* And another word */ gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "totally", -1); return GTK_TREE_MODEL (store); } GtkWidget * do_entry_completion (GtkWidget *do_widget) { GtkWidget *vbox; GtkWidget *label; GtkWidget *entry; GtkEntryCompletion *completion; GtkTreeModel *completion_model; if (!window) { window = gtk_dialog_new_with_buttons ("GtkEntryCompletion", GTK_WINDOW (do_widget), 0, GTK_STOCK_CLOSE, GTK_RESPONSE_NONE, NULL); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); g_signal_connect (window, "response", G_CALLBACK (gtk_widget_destroy), NULL); g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 5); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example."); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); /* Create our entry */ entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0); /* Create the completion object */ completion = gtk_entry_completion_new (); /* Assign the completion to the entry */ gtk_entry_set_completion (GTK_ENTRY (entry), completion); g_object_unref (completion); /* Create a tree model and use it as the completion model */ completion_model = create_completion_model (); gtk_entry_completion_set_model (completion, completion_model); g_object_unref (completion_model); /* Use model column 0 as the text column */ gtk_entry_completion_set_text_column (completion, 0); } if (!GTK_WIDGET_VISIBLE (window)) gtk_widget_show_all (window); else gtk_widget_destroy (window); return window; } int main(int argc,char ** argv) { GtkWidget *w; gtk_init(&argc,&argv); w=gtk_window_new(0); //do_entry_completion(w); g_signal_connect(G_OBJECT(w),"destroy",G_CALLBACK(gtk_main_quit),NULL); gtk_widget_show_all(w); gtk_main(); return 0; }
#ifndef _CPCODES_H_INCLUDED #define _CPCODES_H_INCLUDED #define CP_ENTRY(b, a) {(b), (a)} const char supportedCodepages[] = "437\n" "737\n" "850, 858\n" "851\n" "852\n" "853\n" "855, 872\n" "857\n" "860\n" "861\n" "863\n" "866, 808\n" "865\n" "869"; struct codepageEntryStruct { unsigned char cp; unsigned long unicode; }; #include "cp\cp437.h" #include "cp\cp737.h" #include "cp\cp850.h" /* 850, 858 */ #include "cp\cp851.h" /* 851, 869 */ #include "cp\cp852.h" #include "cp\cp853.h" #include "cp\cp855.h" /* 855, 872 */ #include "cp\cp857.h" #include "cp\cp860.h" #include "cp\cp861.h" #include "cp\cp863.h" #include "cp\cp865.h" #include "cp\cp866.h" /* 866, 808 */ #endif _CPCODES_H_INCLUDED
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_GenericModule_h #define mozilla_GenericModule_h #include "mozilla/Attributes.h" #include "mozilla/Module.h" #define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \ static nsresult \ _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \ void **aResult) \ { \ RefPtr<_InstanceClass> inst; \ \ *aResult = nullptr; \ if (nullptr != aOuter) { \ return NS_ERROR_NO_AGGREGATION; \ } \ \ inst = new _InstanceClass(); \ return inst->QueryInterface(aIID, aResult); \ } #define NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(_InstanceClass, _InitMethod) \ static nsresult \ _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \ void **aResult) \ { \ nsresult rv; \ \ RefPtr<_InstanceClass> inst; \ \ *aResult = nullptr; \ if (nullptr != aOuter) { \ return NS_ERROR_NO_AGGREGATION; \ } \ \ inst = new _InstanceClass(); \ rv = inst->_InitMethod(); \ if (NS_SUCCEEDED(rv)) { \ rv = inst->QueryInterface(aIID, aResult); \ } \ \ return rv; \ } // 'Constructor' that uses an existing getter function that gets a singleton. // NOTE: assumes that getter does an AddRef - so additional AddRef is not done. #define NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(_InstanceClass, _GetterProc) \ static nsresult \ _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \ void **aResult) \ { \ RefPtr<_InstanceClass> inst; \ \ *aResult = nullptr; \ if (nullptr != aOuter) { \ return NS_ERROR_NO_AGGREGATION; \ } \ \ inst = already_AddRefed<_InstanceClass>(_GetterProc()); \ if (nullptr == inst) { \ return NS_ERROR_OUT_OF_MEMORY; \ } \ return inst->QueryInterface(aIID, aResult); \ } #ifndef MOZILLA_INTERNAL_API #include "nsIModule.h" #include "nsISupportsUtils.h" namespace mozilla { class GenericModule final : public nsIModule { ~GenericModule() {} public: explicit GenericModule(const mozilla::Module* aData) : mData(aData) {} NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIMODULE private: const mozilla::Module* mData; }; } // namespace mozilla #endif #endif // mozilla_GenericModule_h
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: sw=4 ts=4 et : * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef dom_plugins_PluginProcessParent_h #define dom_plugins_PluginProcessParent_h 1 #include "mozilla/Attributes.h" #include "base/basictypes.h" #include "base/file_path.h" #include "base/task.h" #include "base/thread.h" #include "chrome/common/child_process_host.h" #include "mozilla/ipc/GeckoChildProcessHost.h" #include "mozilla/ipc/TaskFactory.h" #include "mozilla/UniquePtr.h" #include "nsCOMPtr.h" #include "nsIRunnable.h" namespace mozilla { namespace plugins { class LaunchCompleteTask : public Runnable { public: LaunchCompleteTask() : mLaunchSucceeded(false) { } void SetLaunchSucceeded() { mLaunchSucceeded = true; } protected: bool mLaunchSucceeded; }; class PluginProcessParent : public mozilla::ipc::GeckoChildProcessHost { public: explicit PluginProcessParent(const std::string& aPluginFilePath); ~PluginProcessParent(); /** * Launch the plugin process. If the process fails to launch, * this method will return false. * * @param aLaunchCompleteTask Task that is executed on the main * thread once the asynchonous launch has completed. * @param aSandboxLevel Determines the strength of the sandbox. * <= 0 means no sandbox. */ bool Launch(UniquePtr<LaunchCompleteTask> aLaunchCompleteTask = UniquePtr<LaunchCompleteTask>(), int32_t aSandboxLevel = 0); void Delete(); virtual bool CanShutdown() override { return true; } const std::string& GetPluginFilePath() { return mPluginFilePath; } using mozilla::ipc::GeckoChildProcessHost::GetChannel; void SetCallRunnableImmediately(bool aCallImmediately); virtual bool WaitUntilConnected(int32_t aTimeoutMs = 0) override; virtual void OnChannelConnected(int32_t peer_pid) override; virtual void OnChannelError() override; bool IsConnected(); static bool IsPluginProcessId(base::ProcessId procId); private: void RunLaunchCompleteTask(); std::string mPluginFilePath; ipc::TaskFactory<PluginProcessParent> mTaskFactory; UniquePtr<LaunchCompleteTask> mLaunchCompleteTask; MessageLoop* mMainMsgLoop; bool mRunCompleteTaskImmediately; #ifdef XP_WIN typedef nsTHashtable<nsUint32HashKey> PidSet; // Set of PIDs for all plugin child processes or NULL if empty. static PidSet* sPidSet; uint32_t mChildPid; #endif DISALLOW_EVIL_CONSTRUCTORS(PluginProcessParent); }; } // namespace plugins } // namespace mozilla #endif // ifndef dom_plugins_PluginProcessParent_h
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __mozilla_WindowHook_h__ #define __mozilla_WindowHook_h__ #include <windows.h> #include <nsHashKeys.h> #include <nsClassHashtable.h> #include <nsTArray.h> #include "nsAppShell.h" class nsWindow; namespace mozilla { namespace widget { struct MSGResult; class WindowHook { public: // It is expected that most callbacks will return false typedef bool (*Callback)(void *aContext, HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT *aResult); nsresult AddHook(UINT nMsg, Callback callback, void *context); nsresult RemoveHook(UINT nMsg, Callback callback, void *context); nsresult AddMonitor(UINT nMsg, Callback callback, void *context); nsresult RemoveMonitor(UINT nMsg, Callback callback, void *context); private: struct CallbackData { Callback cb; void *context; CallbackData() : cb(nullptr), context(nullptr) {} CallbackData(Callback cb, void *ctx) : cb(cb), context(ctx) {} bool Invoke(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *aResult); bool operator== (const CallbackData &rhs) const { return cb == rhs.cb && context == rhs.context; } bool operator!= (const CallbackData &rhs) const { return !(*this == rhs); } explicit operator bool () const { return !!cb; } }; typedef nsTArray<CallbackData> CallbackDataArray; struct MessageData { UINT nMsg; CallbackData hook; CallbackDataArray monitors; }; bool Notify(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, MSGResult& aResult); MessageData *Lookup(UINT nMsg); MessageData *LookupOrCreate(UINT nMsg); void DeleteIfEmpty(MessageData *data); typedef nsTArray<MessageData> MessageDataArray; MessageDataArray mMessageData; // For Notify friend class ::nsWindow; }; } } #endif // __mozilla_WindowHook_h__
/* * This file is a part of Xpiks - cross platform application for * keywording and uploading images for microstocks * Copyright (C) 2014-2018 Taras Kushnir <kushnirTV@gmail.com> * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef IFILESCOLLECTION_H #define IFILESCOLLECTION_H #include <vector> #include <QString> namespace Filesystem { enum struct ArtworkFileType: uint8_t { Image, Video, Vector }; struct ArtworkFile { ArtworkFile(const QString &path, ArtworkFileType type, bool isPartOfFullDirectory=false): m_Path(path), m_Type(type), m_IsPartOfFullDirectory(isPartOfFullDirectory) { } bool isPartOfFullDirectory() const { return m_IsPartOfFullDirectory; } QString m_Path; ArtworkFileType m_Type; bool m_IsPartOfFullDirectory; }; class IFilesCollection { public: virtual ~IFilesCollection() {} virtual std::vector<ArtworkFile> const &getFiles() = 0; }; } #endif // IFILESCOLLECTION_H
/** * This module implements some stub for riPin unit test. * * Copyright (C) Sierra Wireless Inc. * */ #include "legato.h" #include "interfaces.h" //-------------------------------------------------------------------------------------------------- /** * Begin monitoring the event loop on the current thread. */ //-------------------------------------------------------------------------------------------------- void le_wdogChain_MonitorEventLoop ( uint32_t watchdog, ///< Watchdog to use for monitoring le_clk_Time_t watchdogInterval ///< Interval at which to check event loop is functioning ) { } //-------------------------------------------------------------------------------------------------- /** * Stop a watchdog. * * This can also cause the chain to be completely kicked, so check it. */ //-------------------------------------------------------------------------------------------------- void le_wdogChain_Stop ( uint32_t watchdog ) { // do nothing }
/***************************************************************************** @(#) $Id: strsubr.h,v 1.1.2.2 2010-11-28 14:21:49 brian Exp $ ----------------------------------------------------------------------------- Copyright (c) 2008-2010 Monavacon Limited <http://www.monavacon.com/> Copyright (c) 2001-2008 OpenSS7 Corporation <http://www.openss7.com/> Copyright (c) 1997-2001 Brian F. G. Bidulock <bidulock@openss7.org> All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>, or write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------------------------------------------------------------------------- U.S. GOVERNMENT RESTRICTED RIGHTS. If you are licensing this Software on behalf of the U.S. Government ("Government"), the following provisions apply to you. If the Software is supplied by the Department of Defense ("DoD"), it is classified as "Commercial Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any successor regulations) and the Government is acquiring only the license rights granted herein (the license rights customarily provided to non-Government users). If the Software is supplied to any unit or agency of the Government other than DoD, it is classified as "Restricted Computer Software" and the Government's rights in the Software are defined in paragraph 52.227-19 of the Federal Acquisition Regulations ("FAR") (or any successor regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR (or any successor regulations). ----------------------------------------------------------------------------- Commercial licensing and support of this software is available from OpenSS7 Corporation at a fee. See http://www.openss7.com/ ----------------------------------------------------------------------------- Last Modified $Date: 2010-11-28 14:21:49 $ by $Author: brian $ ----------------------------------------------------------------------------- $Log: strsubr.h,v $ Revision 1.1.2.2 2010-11-28 14:21:49 brian - remove #ident, protect _XOPEN_SOURCE Revision 1.1.2.1 2009-06-21 11:25:38 brian - added files to new distro *****************************************************************************/ #ifndef __SYS_STRSUBR_H__ #define __SYS_STRSUBR_H__ #ifndef __KERNEL__ #error "Do not use kernel headers for user space programs" #endif /* __KERNEL__ */ #ifdef __BEGIN_DECLS /* *INDENT-OFF* */ __BEGIN_DECLS /* *INDENT-ON* */ #endif /* __BEGIN_DECLS */ #include <sys/openss7/strsubr.h> #ifdef __END_DECLS /* *INDENT-OFF* */ __END_DECLS /* *INDENT-ON* */ #endif /* __END_DECLS */ #endif /* __SYS_STRSUBR_H__ */
//****************************************************************************** /// /// @file core/shape/fractal/util.h /// /// This module contains miscellaneous fractal-related code. /// /// @copyright /// @parblock /// /// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7. /// Copyright 1991-2016 Persistence of Vision Raytracer Pty. Ltd. /// /// POV-Ray is free software: you can redistribute it and/or modify /// it under the terms of the GNU Affero General Public License as /// published by the Free Software Foundation, either version 3 of the /// License, or (at your option) any later version. /// /// POV-Ray is distributed in the hope that it will be useful, /// but WITHOUT ANY WARRANTY; without even the implied warranty of /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /// GNU Affero General Public License for more details. /// /// You should have received a copy of the GNU Affero General Public License /// along with this program. If not, see <http://www.gnu.org/licenses/>. /// /// ---------------------------------------------------------------------------- /// /// POV-Ray is based on the popular DKB raytracer version 2.12. /// DKBTrace was originally written by David K. Buck. /// DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins. /// /// @endparblock /// //****************************************************************************** #ifndef POVRAY_CORE_FRACTAL_UTIL_H #define POVRAY_CORE_FRACTAL_UTIL_H #include "core/coretypes.h" #include <cstdarg> #include <set> #include "core/shape/fractal/types.h" namespace pov { static inline const Vector4d DuplexFromHypercomplex(const Vector4d& h) { return Vector4d(h[X] - h[W], h[Y] + h[Z], h[X] + h[W], h[Y] - h[Z]); } static inline const Vector4d HypercomplexFromDuplex(const Vector4d &d) { return Vector4d(.5 * (d[X] + d[Z]), .5 * (d[Y] + d[W]), .5 * (d[Y] - d[W]), .5 * (d[Z] - d[X])); } static inline void AssignComplex(Complex r, const Complex c) { r[X] = c[X]; r[Y] = c[Y]; } static inline DBL *AsComplex(Vector4d& rV, int p) { return &(*rV)[2*p]; } static inline const DBL *AsComplex(const Vector4d& v, int p) { return &(*v)[2*p]; } template <typename T> static inline int GetADataSize() { return (typeid(NilFractalData) == typeid(T) ? 0 : sizeof(T)); } template <class Rules> static inline const FractalDataSizes GetDataSizes() { FractalDataSizes sizes = { GetADataSize<typename Rules::FixedData>(), GetADataSize<typename Rules::MainIterData>(), GetADataSize<typename Rules::AuxIterData>() }; return sizes; } template <int n, typename T> static inline const std::set<T> CreateSet(T t0, ...) { std::set<T> s; int i; va_list tList; T t; va_start(tList, t0); s.insert(t0); for (i = 1; i < n; i++) { t = va_arg(tList, T); s.insert(t); } va_end(tList); return s; } /* Helper functions to permit inline creation of certain const structs (and const arrays). These are written in such a way as to permit simple replacement for C++11 or higher. */ #ifndef FRACTAL_USE_CXX11 static inline const FractalFuncType CreateFuncType(FractalAlgebra algebra, FractalFunc_FuncType type, FractalFunc_VariantType variant) { FractalFuncType f = { algebra, type, variant }; return f; } static inline const FractalRulesInfo CreateRulesInfo(const FractalFuncType& funcType, DiscontinuitySupportLevel discontinuitySupport, const FractalDataSizes& sizes, EstimatorType estimatorType) { FractalRulesInfo f = { funcType, discontinuitySupport, sizes, estimatorType }; return f; } #else /* The easy part. */ #define CREATE_GENERAL(...) {__VA_ARGS__} #define CreateFuncType (FractalFuncType)CREATE_GENERAL #define CreateRulesInfo (FractalRulesInfo)CREATE_GENERAL #endif } #endif
/* * Copyright (C) 2002-2007 Novamente LLC * Copyright (C) 2008 by Singularity Institute for Artificial Intelligence * All Rights Reserved * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License v3 as * published by the Free Software Foundation and including the exceptions * at http://opencog.org/wiki/Licenses * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program; if not, write to: * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _BACKWARDINFERENCETASK_H_ #define _BACKWARDINFERENCETASK_H_ #ifndef USE_PSEUDOCORE namespace opencog { namespace pln { class InferenceTaskParameters; /** The goal/BackwardInferenceAgent should be replaced by this kind of a structure, which is not yet implemented beyond this simple skeleton. */ //! @todo this should inherit from Task... but Task doesn't exist in OpenCog yet class BackwardInferenceTask { const InferenceTaskParameters& pars; bool finished; public: BackwardInferenceTask(const InferenceTaskParameters& _pars); virtual ~BackwardInferenceTask(); virtual void cycle(); /** * Task Interface: This method is called when the Task has spent the amount of * resources it was granted by its EffortMonitor. */ virtual void finish(); bool ok(); }; }} #endif //#ifndef USE_PSEUDOCORE #endif //_BACKWARDINFERENCETASK_H_
#ifndef OpenKAI_src_Primitive_vDouble3_H_ #define OpenKAI_src_Primitive_vDouble3_H_ #include "../Base/platform.h" namespace kai { struct vDouble3 { double x; double y; double z; void init(void) { x = 0.0; y = 0.0; z = 0.0; } void init(double v) { x = v; y = v; z = v; } void init(double a, double b, double c) { x = a; y = b; z = c; } inline vDouble3 operator+(vDouble3& r) { vDouble3 v; v.x = x + r.x; v.y = y + r.y; v.z = z + r.z; return v; } inline vDouble3 operator-(vDouble3& r) { vDouble3 v; v.x = x - r.x; v.y = y - r.y; v.z = z - r.z; return v; } inline vDouble3 operator*(double r) { vDouble3 v; v.x = x * r; v.y = y * r; v.z = z * r; return v; } inline vDouble3 operator/(double r) { vDouble3 v; v.x = x / r; v.y = y / r; v.z = z / r; return v; } inline void operator=(double r) { x = r; y = r; z = r; } inline void operator+=(vDouble3& r) { x += r.x; y += r.y; z += r.z; } inline void operator-=(vDouble3& r) { x -= r.x; y -= r.y; z -= r.z; } inline void operator*=(double r) { x *= r; y *= r; z *= r; } inline void operator/=(double r) { x /= r; y /= r; z /= r; } double len(void) { return sqrt(x*x + y*y + z*z); } double sum(void) { return x+y+z; } Eigen::Vector3d v3d(void) { return Eigen::Vector3d(x,y,z); } }; } #endif
/* Copyright (C) 2015 Claude SIMON (http://q37.info/contact/). This file is part of XDHWebQ. XDHWebQ is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. XDHWebQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with XDHWebQ. If not, see <http://www.gnu.org/licenses/>. */ #ifndef XDWRGSTRY_INC_ # define XDWRGSTRY_INC_ # include "sclr.h" namespace xdwrgstry { using namespace sclr; namespace parameter { using namespace sclr::parameter; extern rEntry ModuleFilename; } namespace definition { using namespace sclr::definition; } } #endif
#include "f2c.h" #include "blaswrap.h" doublereal dsdot_(integer *n, real *sx, integer *incx, real *sy, integer * incy) { /* System generated locals */ integer i__1, i__2; doublereal ret_val; /* Local variables */ integer i__, ns, kx, ky; /* .. Scalar Arguments .. */ /* .. */ /* .. Array Arguments .. */ /* .. */ /* AUTHORS */ /* ======= */ /* Lawson, C. L., (JPL), Hanson, R. J., (SNLA), */ /* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL) */ /* Purpose */ /* ======= */ /* Compute the inner product of two vectors with extended */ /* precision accumulation and result. */ /* Returns D.P. dot product accumulated in D.P., for S.P. SX and SY */ /* DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY), */ /* where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is */ /* defined in a similar way using INCY. */ /* Arguments */ /* ========= */ /* N (input) INTEGER */ /* number of elements in input vector(s) */ /* SX (input) REAL array, dimension(N) */ /* single precision vector with N elements */ /* INCX (input) INTEGER */ /* storage spacing between elements of SX */ /* SY (input) REAL array, dimension(N) */ /* single precision vector with N elements */ /* INCY (input) INTEGER */ /* storage spacing between elements of SY */ /* DSDOT (output) DOUBLE PRECISION */ /* DSDOT double precision dot product (zero if N.LE.0) */ /* REFERENCES */ /* ========== */ /* C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. */ /* Krogh, Basic linear algebra subprograms for Fortran */ /* usage, Algorithm No. 539, Transactions on Mathematical */ /* Software 5, 3 (September 1979), pp. 308-323. */ /* REVISION HISTORY (YYMMDD) */ /* ========================== */ /* 791001 DATE WRITTEN */ /* 890831 Modified array declarations. (WRB) */ /* 890831 REVISION DATE from Version 3.2 */ /* 891214 Prologue converted to Version 4.0 format. (BAB) */ /* 920310 Corrected definition of LX in DESCRIPTION. (WRB) */ /* 920501 Reformatted the REFERENCES section. (WRB) */ /* 070118 Reformat to LAPACK style (JL) */ /* ===================================================================== */ /* .. Local Scalars .. */ /* .. */ /* .. Intrinsic Functions .. */ /* .. */ /* Parameter adjustments */ --sy; --sx; /* Function Body */ ret_val = 0.; if (*n <= 0) { return ret_val; } if (*incx == *incy && *incx > 0) { goto L20; } /* Code for unequal or nonpositive increments. */ kx = 1; ky = 1; if (*incx < 0) { kx = (1 - *n) * *incx + 1; } if (*incy < 0) { ky = (1 - *n) * *incy + 1; } i__1 = *n; for (i__ = 1; i__ <= i__1; ++i__) { ret_val += (doublereal) sx[kx] * (doublereal) sy[ky]; kx += *incx; ky += *incy; /* L10: */ } return ret_val; /* Code for equal, positive, non-unit increments. */ L20: ns = *n * *incx; i__1 = ns; i__2 = *incx; for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { ret_val += (doublereal) sx[i__] * (doublereal) sy[i__]; /* L30: */ } return ret_val; } /* dsdot_ */
/** * Copyright (C) 2015 3D Repo Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Simple Diff Comparison - only compare names */ #pragma once #include "repo_diff_abstract.h" namespace repo{ namespace manipulator{ namespace diff{ class DiffByName : public AbstractDiff { public: /** * Construct a diff comparator given the 2 scenes supplied * @param base base scene to compare from * @param compare scene to compare against * @param gType graph type to diff (default: unoptimised) */ DiffByName( const repo::core::model::RepoScene *base, const repo::core::model::RepoScene *compare, const repo::core::model::RepoScene::GraphType &gType = repo::core::model::RepoScene::GraphType::DEFAULT); virtual ~DiffByName(); /** * Check if comparator functioned fine * @param msg error message should boolean returns false * @return returns true if comparator operated successfully */ virtual bool isOk(std::string &msg) const { msg = this->msg; return ok; }; private: /** * Get the difference of the 2 graphs as a scene */ bool compare( std::string &msg); /** * Compare the 2 given node sets and update the diff results * @param baseIDs (compared IDs will be removed) * @param compIDs (compared IDs will be removed) * @param baseNodes nodes to compare as base revision * @param compNodes nodes to compare as compare-to revision */ void compareNodes( std::set<repo::lib::RepoUUID> &baseIDs, std::set<repo::lib::RepoUUID> &compIDs, const repo::core::model::RepoNodeSet &baseNodes, const repo::core::model::RepoNodeSet &compNodes); /** * Given a RepoNodeSet, return a map of {name, RepoNode*} * @param nodes repoNodeSet to convert from * @return returns an undered map containing key value of name and RepoNode* */ std::unordered_map<std::string, repo::core::model::RepoNode*> createNodeMap( const repo::core::model::RepoNodeSet &nodes); bool ok; //Check if comparator status is ok bool errorReported; std::string msg; //error message if comaprator statis is false }; } } }
/* * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) * From ASN.1 module "EUTRA-RRC-Definitions" * found in "36331-ac0.asn" * `asn1c -S /home/nyee/srsLTE/srslte/examples/src/asn1c/skeletons -fcompound-names -fskeletons-copy -gen-PER -pdu=auto` */ #include "IRAT-ParametersUTRA-TDD128.h" static asn_TYPE_member_t asn_MBR_IRAT_ParametersUTRA_TDD128_1[] = { { ATF_NOFLAGS, 0, offsetof(struct IRAT_ParametersUTRA_TDD128, supportedBandListUTRA_TDD128), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SupportedBandListUTRA_TDD128, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "supportedBandListUTRA-TDD128" }, }; static const ber_tlv_tag_t asn_DEF_IRAT_ParametersUTRA_TDD128_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_IRAT_ParametersUTRA_TDD128_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* supportedBandListUTRA-TDD128 */ }; static asn_SEQUENCE_specifics_t asn_SPC_IRAT_ParametersUTRA_TDD128_specs_1 = { sizeof(struct IRAT_ParametersUTRA_TDD128), offsetof(struct IRAT_ParametersUTRA_TDD128, _asn_ctx), asn_MAP_IRAT_ParametersUTRA_TDD128_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* Start extensions */ -1 /* Stop extensions */ }; asn_TYPE_descriptor_t asn_DEF_IRAT_ParametersUTRA_TDD128 = { "IRAT-ParametersUTRA-TDD128", "IRAT-ParametersUTRA-TDD128", SEQUENCE_free, SEQUENCE_print, SEQUENCE_constraint, SEQUENCE_decode_ber, SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, SEQUENCE_decode_uper, SEQUENCE_encode_uper, 0, /* Use generic outmost tag fetcher */ asn_DEF_IRAT_ParametersUTRA_TDD128_tags_1, sizeof(asn_DEF_IRAT_ParametersUTRA_TDD128_tags_1) /sizeof(asn_DEF_IRAT_ParametersUTRA_TDD128_tags_1[0]), /* 1 */ asn_DEF_IRAT_ParametersUTRA_TDD128_tags_1, /* Same as above */ sizeof(asn_DEF_IRAT_ParametersUTRA_TDD128_tags_1) /sizeof(asn_DEF_IRAT_ParametersUTRA_TDD128_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ asn_MBR_IRAT_ParametersUTRA_TDD128_1, 1, /* Elements count */ &asn_SPC_IRAT_ParametersUTRA_TDD128_specs_1 /* Additional specs */ };
/*************************************************************************** helponstudentsminhoursdaily.h - description ------------------- begin : 2009 copyright : (C) 2009 by Lalescu Liviu email : Please see https://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address) ***************************************************************************/ /*************************************************************************** * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU Affero General Public License as * * published by the Free Software Foundation, either version 3 of the * * License, or (at your option) any later version. * * * ***************************************************************************/ #ifndef HELPONSTUDENTSMINHOURSDAILY_H #define HELPONSTUDENTSMINHOURSDAILY_H #include <QApplication> class HelpOnStudentsMinHoursDaily{ Q_DECLARE_TR_FUNCTIONS(HelpOnStudentsMinHoursDaily); public: static void help(QWidget* parent); }; #endif
/* * Copyright (c) 2008-2009 Digital Bazaar, Inc. All rights reserved. */ #ifndef monarch_validation_Null_H #define monarch_validation_Null_H #include "monarch/validation/Validator.h" namespace monarch { namespace validation { /** * Validates the target object as being null. * * @author Dave Longley */ class Null : public Validator { public: /** * Creates a new validator. * * @param errorMessage custom error message. */ Null(const char* errorMessage = NULL); /** * Destructs this validator. */ virtual ~Null(); /** * Checks if an object is valid. * * @param obj the object to validate. * @param context context to use during validation. * * @return true if obj is valid, false and exception set otherwise. */ virtual bool isValid( monarch::rt::DynamicObject& obj, ValidatorContext* context); using Validator::isValid; }; } // end namespace validation } // end namespace monarch #endif
// @sobolev #define USE_COPYRIGHT_CR #include <7zVersion.h>
/***************************************************************************** @(#) $Id: mgcp.h,v 1.1.2.2 2010-11-28 14:21:49 brian Exp $ ----------------------------------------------------------------------------- Copyright (c) 2008-2010 Monavacon Limited <http://www.monavacon.com/> Copyright (c) 2001-2008 OpenSS7 Corporation <http://www.openss7.com/> Copyright (c) 1997-2001 Brian F. G. Bidulock <bidulock@openss7.org> All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>, or write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------------------------------------------------------------------------- U.S. GOVERNMENT RESTRICTED RIGHTS. If you are licensing this Software on behalf of the U.S. Government ("Government"), the following provisions apply to you. If the Software is supplied by the Department of Defense ("DoD"), it is classified as "Commercial Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any successor regulations) and the Government is acquiring only the license rights granted herein (the license rights customarily provided to non-Government users). If the Software is supplied to any unit or agency of the Government other than DoD, it is classified as "Restricted Computer Software" and the Government's rights in the Software are defined in paragraph 52.227-19 of the Federal Acquisition Regulations ("FAR") (or any successor regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR (or any successor regulations). ----------------------------------------------------------------------------- Commercial licensing and support of this software is available from OpenSS7 Corporation at a fee. See http://www.openss7.com/ ----------------------------------------------------------------------------- Last Modified $Date: 2010-11-28 14:21:49 $ by $Author: brian $ ----------------------------------------------------------------------------- $Log: mgcp.h,v $ Revision 1.1.2.2 2010-11-28 14:21:49 brian - remove #ident, protect _XOPEN_SOURCE Revision 1.1.2.1 2009-06-21 11:25:37 brian - added files to new distro *****************************************************************************/ #ifndef __SS7_MGCP_H__ #define __SS7_MGCP_H__ /* This file can be processed by doxygen(1). */ #define MGCP_ADD_REQ #define MGCP_ADD_CON #define MGCP_MODIFY_REQ #define MGCP_MODIFY_CON #define MGCP_SUBTRACT_REQ #define MGCP_SUBTRACT_CON #define MGCP_MOVE_REQ #define MGCP_MOVE_CON #define MGCP_OK_ACK #define MGCP_ERROR_ACK #define MGCP_AUDIT_VALUE_REQ #define MGCP_AUDIT_VALUE_CON #define MGCP_AUDIT_CAPABILITIES_REQ #define MGCP_AUDIT_CAPABILITIES_CON #define MGCP_NOTIFY_IND #define MGCP_SERVICE_CHANGE_IND #endif /* __SS7_MGCP_H__ */
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2015 Alec Jacobson <alecjacobson@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #ifndef IGL_HAUSDORFF_H #define IGL_HAUSDORFF_H #include "igl_inline.h" #include <Eigen/Dense> #include <functional> namespace igl { // HAUSDORFF compute the Hausdorff distance between mesh (VA,FA) and mesh // (VB,FB). This is the // // d(A,B) = max ( max min d(a,b) , max min d(b,a) ) // a∈A b∈B b∈B a∈A // // Known issue: This is only computing max(min(va,B),min(vb,A)). This is // better than max(min(va,Vb),min(vb,Va)). This (at least) is missing // "edge-edge" cases like the distance between the two different // triangulations of a non-planar quad in 3D. Even simpler, consider the // Hausdorff distance between the non-convex, block letter V polygon (with 7 // vertices) in 2D and its convex hull. The Hausdorff distance is defined by // the midpoint in the middle of the segment across the concavity and some // non-vertex point _on the edge_ of the V. // // Inputs: // VA #VA by 3 list of vertex positions // FA #FA by 3 list of face indices into VA // VB #VB by 3 list of vertex positions // FB #FB by 3 list of face indices into VB // Outputs: // d hausdorff distance // //pair 2 by 3 list of "determiner points" so that pair(1,:) is from A // // and pair(2,:) is from B // template < typename DerivedVA, typename DerivedFA, typename DerivedVB, typename DerivedFB, typename Scalar> IGL_INLINE void hausdorff( const Eigen::PlainObjectBase<DerivedVA> & VA, const Eigen::PlainObjectBase<DerivedFA> & FA, const Eigen::PlainObjectBase<DerivedVB> & VB, const Eigen::PlainObjectBase<DerivedFB> & FB, Scalar & d); // Compute lower and upper bounds (l,u) on the Hausdorff distance between a triangle // (V) and a pointset (e.g., mesh, triangle soup) given by a distance function // handle (dist_to_B). // // Inputs: // V 3 by 3 list of corner positions so that V.row(i) is the position of the // ith corner // dist_to_B function taking the x,y,z coordinate of a query position and // outputting the closest-point distance to some point-set B // Outputs: // l lower bound on Hausdorff distance // u upper bound on Hausdorff distance // template < typename DerivedV, typename Scalar> IGL_INLINE void hausdorff( const Eigen::MatrixBase<DerivedV>& V, const std::function< Scalar(const Scalar &,const Scalar &, const Scalar &)> & dist_to_B, Scalar & l, Scalar & u); } #ifndef IGL_STATIC_LIBRARY # include "hausdorff.cpp" #endif #endif
#ifndef __OpenViBE_AcquisitionServer_CDriverEnobio3G_H__ #define __OpenViBE_AcquisitionServer_CDriverEnobio3G_H__ #if defined(TARGET_HAS_ThirdPartyEnobioAPI) #include "ovasIDriver.h" #include "../ovasCHeader.h" #include <openvibe/ov_all.h> #include "../ovasCSettingsHelper.h" #include "../ovasCSettingsHelperOperators.h" // Including Enobio headers gave 4275 on 11.07.2014 w/ VS2010 #pragma warning(disable:4275) #include "enobio3g.h" #include "StatusData.h" #include <boost/thread.hpp> #include <boost/thread/condition.hpp> #ifndef _ENOBIO_SAMPLE_RATE_ #ifdef FREQ_SAMP #define _ENOBIO_SAMPLE_RATE_ FREQSAMP #else #define _ENOBIO_SAMPLE_RATE_ 500 #endif #endif namespace OpenViBEAcquisitionServer { /** * \class CDriverEnobio3G * \author Anton Albajes-Eizagirre (NeuroElectrics) anton.albajes-eizagirre@neuroelectrics.com * \date Tue Apr 15 09:25:20 2014 * \brief The CDriverEnobio3G allows the acquisition server to acquire data from a Enobio3G device. * * TODO: details * * \sa CConfigurationEnobio3G */ class CDriverEnobio3G : public OpenViBEAcquisitionServer::IDriver, public IDataConsumer { public: CDriverEnobio3G(OpenViBEAcquisitionServer::IDriverContext& rDriverContext); virtual ~CDriverEnobio3G(void); virtual const char* getName(void); virtual OpenViBE::boolean initialize( const OpenViBE::uint32 ui32SampleCountPerSentBlock, OpenViBEAcquisitionServer::IDriverCallback& rCallback); virtual OpenViBE::boolean uninitialize(void); virtual OpenViBE::boolean start(void); virtual OpenViBE::boolean stop(void); virtual OpenViBE::boolean loop(void); virtual OpenViBE::boolean isConfigurable(void); virtual OpenViBE::boolean configure(void); virtual const OpenViBEAcquisitionServer::IHeader* getHeader(void) { return &m_oHeader; } virtual OpenViBE::boolean isFlagSet( const OpenViBEAcquisitionServer::EDriverFlag eFlag) const { return eFlag==DriverFlag_IsUnstable; } // enobio registered consumers callbacks void receiveData(const PData &data); void newStatusFromDevice(const PData &data); protected: SettingsHelper m_oSettings; OpenViBEAcquisitionServer::IDriverCallback* m_pCallback; // Replace this generic Header with any specific header you might have written OpenViBEAcquisitionServer::CHeader m_oHeader; OpenViBE::uint32 m_ui32SampleCountPerSentBlock; // sample buffers. We will have a set of buffers that will be cycled. OpenViBE::float32** m_pSample; private: /* * Insert here all specific attributes, such as USB port number or device ID. * Example : */ // OpenViBE::uint32 m_ui32ConnectionID; OpenViBE::uint32 m_ui32nChannels; // Number of channels on the device reported by the device unsigned char *m_macAddress; // mac address of the device Enobio3G m_enobioDevice; // Enobio device class instantiation OpenViBE::uint32 m_ui32SampleRate; // sampling rate of the device OpenViBE::uint32 m_ui32bufHead; // writing header for the current buffer OpenViBE::uint32 m_ui32nBuffers; // number of buffers OpenViBE::uint32 m_ui32currentBuffer; // current buffer in use OpenViBE::uint32 m_ui32lastBufferFilled; // last buffer filled with data ready to be submitted OpenViBE::boolean m_bNewData; // if there is a new buffer with data ready to be submitted boost::mutex m_oMutex; }; }; #endif #endif // __OpenViBE_AcquisitionServer_CDriverEnobio3G_H__
/* * (c) Copyright Ascensio System SIA 2010-2019 * * This program is a free software product. You can redistribute it and/or * modify it under the terms of the GNU Affero General Public License (AGPL) * version 3 as published by the Free Software Foundation. In accordance with * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement * of any third-party rights. * * This program is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html * * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha * street, Riga, Latvia, EU, LV-1050. * * The interactive user interfaces in modified source and object code versions * of the Program must display Appropriate Legal Notices, as required under * Section 5 of the GNU AGPL version 3. * * Pursuant to Section 7(b) of the License you must retain the original Product * logo when distributing the program. Pursuant to Section 7(e) we decline to * grant you any rights under trademark law for use of our trademarks. * * All the Product's GUI elements, including illustrations and icon sets, as * well as technical writing content are licensed under the terms of the * Creative Commons Attribution-ShareAlike 4.0 International. See the License * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ #pragma once #include "OOXShadingReader.h" #include "OOXBorderReader.h" #include "OOXReaderBasic.h" #include "OOXcnfStyleReader.h" #include "OOXrPrReader.h" #include "OOXSectionPropertyReader.h" #include "OOXcnfStyleReader.h" class OOXpPrReader { private: bool ParseDrawing( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty); PPTX::Logic::TextParagraphPr * m_drawingParaProps; OOX::Logic::CParagraphProperty * m_ooxParaProps; public: bool m_bDefStyle; OOXpPrReader(OOX::Logic::CParagraphProperty *ooxParaProps) { m_bDefStyle = true; m_ooxParaProps = ooxParaProps; m_drawingParaProps = NULL; } OOXpPrReader(PPTX::Logic::TextParagraphPr *ooxParaProps) { m_bDefStyle = true; m_ooxParaProps = NULL; m_drawingParaProps = ooxParaProps; } bool Parse( ReaderParameter oParam ,RtfParagraphProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle); };
/* * (c) Copyright Ascensio System SIA 2010-2019 * * This program is a free software product. You can redistribute it and/or * modify it under the terms of the GNU Affero General Public License (AGPL) * version 3 as published by the Free Software Foundation. In accordance with * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement * of any third-party rights. * * This program is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html * * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha * street, Riga, Latvia, EU, LV-1050. * * The interactive user interfaces in modified source and object code versions * of the Program must display Appropriate Legal Notices, as required under * Section 5 of the GNU AGPL version 3. * * Pursuant to Section 7(b) of the License you must retain the original Product * logo when distributing the program. Pursuant to Section 7(e) we decline to * grant you any rights under trademark law for use of our trademarks. * * All the Product's GUI elements, including illustrations and icon sets, as * well as technical writing content are licensed under the terms of the * Creative Commons Attribution-ShareAlike 4.0 International. See the License * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ #pragma once #include "OfficeArtRecord.h" #include "OfficeArtIDCL.h" namespace XLS { class CFRecord; } namespace ODRAW { class OfficeArtFDGGBlock : public OfficeArtRecord { BASE_STRUCTURE_DEFINE_CLASS_NAME(OfficeArtFDGGBlock) public: OfficeArtFDGGBlock(); XLS::BiffStructurePtr clone(); static const XLS::ElementType type = XLS::typeOfficeArtFDGGBlock; virtual void loadFields(XLS::CFRecord& record); _UINT32 spidMax; _UINT32 cspSaved; _UINT32 cdgSaved; std::vector<OfficeArtIDCL> Rgidcl; }; typedef boost::shared_ptr<OfficeArtFDGGBlock> OfficeArtFDGGBlockPtr; } // namespace XLS
//////////////////////////////////////////////////////////////// // // Copyright (C) 2005 Affymetrix, Inc. // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License // (version 2.1) as published by the Free Software Foundation. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License // for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this library; if not, write to the Free Software Foundation, Inc., // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // //////////////////////////////////////////////////////////////// #ifndef _CELFileConversionOptions_HEADER_ #define _CELFileConversionOptions_HEADER_ #include <cstring> #include <string> /*! file CELFileConversionOptions.h This file contains a class for options when converting CEL files. */ namespace affymetrix_cel_converter { /*! This class holds options for converting CEL files. */ class CELFileConversionOptions { public: /*! Constructor */ CELFileConversionOptions(); /*! The chip type to write out */ const char *m_ChipType; // we do not own this memory, null == no change /*! The file name to put in the header */ const char *m_DATFileName; // we do not own this memory, null == no change static std::string newDatName(const std::string &datHeader, const std::string &newName); }; } #endif
/* * network_event.h: network event queue processing helpers * * Copyright (C) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see * <http://www.gnu.org/licenses/>. * * Author: Cedric Bosdonnat */ #include "internal.h" #include "object_event.h" #include "object_event_private.h" #ifndef __NETWORK_EVENT_H__ # define __NETWORK_EVENT_H__ int virNetworkEventStateRegisterID(virConnectPtr conn, virObjectEventStatePtr state, virNetworkPtr net, int eventID, virConnectObjectEventGenericCallback cb, void *opaque, virFreeCallback freecb, int *callbackID); void *virNetworkEventLifecycleNew(const char *name, const unsigned char *uuid, int type); void virNetworkEventDispatchDefaultFunc(virConnectPtr conn, virObjectEventPtr event, virConnectNetworkEventGenericCallback cb, void *cbopaque, void *opaque); #endif
#ifndef OBSERVER_MIXIN_H #define OBSERVER_MIXIN_H /* libtinymail-camel - The Tiny Mail base library for Camel * Copyright (C) 2006-2007 Philip Van Hoof <pvanhoof@gnome.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with self library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include <glib.h> #include <glib-object.h> typedef struct _ObserverMixin { GList *list; GStaticRecMutex *lock; } ObserverMixin; typedef void (*ObserverUpdateMethod) (gpointer, gpointer); void _observer_mixin_init (ObserverMixin *mixin); void _observer_mixin_destroy (gpointer owner, ObserverMixin *mixin); void _observer_mixin_add_observer (gpointer owner, ObserverMixin *mixin, gpointer observer); void _observer_mixin_remove_observer (gpointer owner, ObserverMixin *mixin, gpointer observer); void _observer_mixin_remove_all_observers (gpointer owner, ObserverMixin *mixin); void _observer_mixin_notify_observers_about_in_idle (gpointer mixin_owner, ObserverMixin *mixin, ObserverUpdateMethod method, gpointer change, TnyLockable *ui_lock, GDestroyNotify done_notify); void _observer_mixin_notify_observers_about (ObserverMixin *mixin, ObserverUpdateMethod method, gpointer change, TnyLockable *ui_lock); #endif
// The libMesh Finite Element Library. // Copyright (C) 2002-2021 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef LIBMESH_FACE_QUAD4_SHELL_H #define LIBMESH_FACE_QUAD4_SHELL_H #include "face_quad4.h" namespace libMesh { /** * QuadShell4 is almost identical to Quad4. The only difference is * with the type of boundary data we store for this case. We need this * "stub" class in order to differentiate between this class and other * classes when reading/writing Mesh files. * * \author David Knezevic * \date 2016 * \brief A 2D quadrilateral shell element with 4 nodes. */ class QuadShell4 : public Quad4 { public: /** * Constructor. By default this element has no parent. */ explicit QuadShell4 (Elem * p=nullptr) : Quad4(p) {} QuadShell4 (QuadShell4 &&) = delete; QuadShell4 (const QuadShell4 &) = delete; QuadShell4 & operator= (const QuadShell4 &) = delete; QuadShell4 & operator= (QuadShell4 &&) = delete; virtual ~QuadShell4() = default; /** * \returns \p QUADSHELL4. */ virtual ElemType type () const override { return QUADSHELL4; } }; } // namespace libMesh #endif
#include <stdio.h> #include <kernel_intern.h> extern void board_init(void); __attribute__((constructor)) static void startup(void) { /* use putchar so the linker links it in: */ putchar('\n'); board_init(); puts("RIOT MSP430 hardware initialization complete.\n"); kernel_init(); }
// Copyright (C) 2014-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // Author: Adrien Bruneton (CEA) #ifndef PVViewer_VIEWMANAGER_H #define PVViewer_VIEWMANAGER_H #include "PVViewer.h" #include <SUIT_ViewManager.h> class SUIT_Desktop; class SUIT_Study; class SUIT_ViewWindow; class LogWindow; class PVServer_ServiceWrapper; class QMainWindow; class PVVIEWER_EXPORT PVViewer_ViewManager : public SUIT_ViewManager { Q_OBJECT public: PVViewer_ViewManager( SUIT_Study*, SUIT_Desktop*, LogWindow *); ~PVViewer_ViewManager() {} //! Get the CORBA engine wrapper. static PVServer_ServiceWrapper * GetService(); //! Get PVViewer configuration path as stored by SALOME's resource manager: static QString GetPVConfigPath(); //! Connect to the external PVServer, using the PARAVIS engine to launch it if it is not //! already up. static bool ConnectToExternalPVServer(QMainWindow* aDesktop); protected slots: void onWindowActivated(SUIT_ViewWindow*); private: SUIT_Desktop * desktop; }; #endif
/*____________________________________________________________________________ FreeAmp - The Free MP3 Player Portions Copyright (C) 1998-1999 Tony Arcieri Portions Copyright (C) 1999-2000 EMusic.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. $Id: cdaudio.h,v 1.1 2004/10/13 16:16:05 linha2 Exp $ ____________________________________________________________________________*/ #ifndef _CDAUDIO_H #define _CDAUDIO_H #define LIBCDAUDIO_VERSION_MAJOR 0 #define LIBCDAUDIO_VERSION_MINOR 99 #define LIBCDAUDIO_VERSION_MICRO 4 #define LIBCDAUDIO_VERSION \ ((LIBCDAUDIO_VERSION_MAJOR<<16)| \ (LIBCDAUDIO_VERSION_MINOR<< 8)| \ (LIBCDAUDIO_VERSION_MICRO)) /* Used with disc_info */ #define CDAUDIO_PLAYING 0 #define CDAUDIO_PAUSED 1 #define CDAUDIO_COMPLETED 2 #define CDAUDIO_NOSTATUS 3 #define CDAUDIO_INVALID 4 #define CDAUDIO_ERROR 5 #define CDAUDIO_TRACK_AUDIO 0 #define CDAUDIO_TRACK_DATA 1 #define MAX_TRACKS 100 #define MAX_SLOTS 100 /* For CD changers */ #define PLAY_START_TRACK 0 #define PLAY_END_TRACK 1 #define PLAY_START_POSITION 2 #define PLAY_END_POSITION 4 extern long cdaudio_getversion(void); /* Used for keeping track of times */ struct disc_timeval { int minutes; int seconds; int frames; }; /* Brief disc information */ struct disc_status { int status_present; /* Is disc present? */ int status_mode; /* Disc mode */ struct disc_timeval status_disc_time; /* Current disc time */ struct disc_timeval status_track_time; /* Current track time */ int status_current_track; /* Current track */ }; /* Track specific information */ struct track_info { struct disc_timeval track_length; /* Length of track */ struct disc_timeval track_pos; /* Position of track */ int track_lba; /* Logical Block Address */ int track_type; /* CDAUDIO_TRACK_AUDIO or CDAUDIO_TRACK_DATA */ }; /* Disc information such as current track, amount played, etc */ struct disc_info { int disc_present; /* Is disc present? */ int disc_mode; /* Current disc mode */ struct disc_timeval disc_track_time; /* Current track time */ struct disc_timeval disc_time; /* Current disc time */ struct disc_timeval disc_length; /* Total disc length */ int disc_current_track; /* Current track */ int disc_first_track; /* First track on the disc */ int disc_total_tracks; /* Number of tracks on disc */ struct track_info disc_track[MAX_TRACKS]; /* Track specific information */ }; /* Invisible volume structure */ struct __volume { int left; int right; }; /* Volume structure */ struct disc_volume { struct __volume vol_front; /* Normal volume settings */ struct __volume vol_back; /* Surround sound volume settings */ }; /* Function prototopes */ int cd_frames_to_lba(int frames); int cd_lba_to_frames(int lba); int cd_msf_to_frames(struct disc_timeval time); int cd_msf_to_lba(struct disc_timeval time); void cd_frames_to_msf(struct disc_timeval *time, int frames); void cd_lba_to_msf(struct disc_timeval *time, int frames); int cd_init_device(char *device_name); int cd_finish(int cd_desc); int cd_stat(int cd_desc, struct disc_info *disc, bool read_toc = true); int cd_poll(int cd_desc, struct disc_status *status); int cd_update(struct disc_info *disc, struct disc_status status); int cd_play_frames(int cd_desc, int startframe, int endframe); int cd_playctl(int cd_desc, int options, int start_track, ...); int cd_play_track_pos(int cd_desc, int starttrack, int endtrack, int startpos); int cd_play_track(int cd_desc, int starttrack, int endtrack); int cd_play_pos(int cd_desc, int track, int startpos); int cd_play(int cd_desc, int track); int cd_track_advance(int cd_desc, int endtrack, struct disc_timeval time); int cd_advance(int cd_desc, struct disc_timeval time); int cd_stop(int cd_desc); int cd_pause(int cd_desc); int cd_resume(int cd_desc); int cd_eject(int cd_desc); int cd_close(int cd_desc); int cd_set_volume(int cd_desc, struct disc_volume vol); int cd_get_volume(int cd_desc, struct disc_volume *vol); long unsigned cddb_direct_discid(struct disc_info disc); long cddb_discid(int cd_desc); int cdindex_direct_discid(struct disc_info disc, char *discid, int len); int cdindex_discid(int cd_desc, char *discid, int len); #endif
#ifndef INT_SCANNER_W_H_INCLUDED #define INT_SCANNER_W_H_INCLUDED /******************************************************************************* * gtparser - Generic Text parsing functions library * Copyright (C) 2018 Michael M. Builov, https://github.com/mbuilov/gtparser * Licensed under LGPL version 2.1 or any later version, see COPYING *******************************************************************************/ /* int_scanner_w.h */ #include "gtparser/gtparser.h" #ifndef INT64_TYPE #define INT64_TYPE long long #endif #ifdef __cplusplus extern "C" { #endif /* input: s points to [0-9] */ /* return: pointer to non-[0-9], may be to end */ /* returns NULL on integer overflow */ GTPARSER_EXPORTS const wchar_t *gt_scan_uint_w(const wchar_t *s/*<end*/, const wchar_t *const end, unsigned *number/*out*/); GTPARSER_EXPORTS const wchar_t *gt_scan_uint64_w(const wchar_t *s/*<end*/, const wchar_t *const end, unsigned INT64_TYPE *number/*out*/); /* input: s points to [0-9a-fA-F] */ /* return: pointer to non-[0-9a-fA-F], may be to end */ /* returns NULL on integer overflow */ GTPARSER_EXPORTS const wchar_t *gt_scan_hex_w(const wchar_t *s/*<end*/, const wchar_t *const end, unsigned *number/*out*/); GTPARSER_EXPORTS const wchar_t *gt_scan_hex64_w(const wchar_t *s/*<end*/, const wchar_t *const end, unsigned INT64_TYPE *number/*out*/); /* input: s points to [0-9] */ /* return: pointer to non-[0-9], may be to '\0' */ /* returns NULL on integer overflow */ GTPARSER_EXPORTS const wchar_t *gt_scan_uint_w_z(const wchar_t *s/*'\0'-terminated*/, unsigned *number/*out*/); GTPARSER_EXPORTS const wchar_t *gt_scan_uint64_w_z(const wchar_t *s/*'\0'-terminated*/, unsigned INT64_TYPE *number/*out*/); /* input: s points to [0-9a-fA-F] */ /* return: pointer to non-[0-9a-fA-F], may be to '\0' */ /* returns NULL on integer overflow */ GTPARSER_EXPORTS const wchar_t *gt_scan_hex_w_z(const wchar_t *s/*'\0'-terminated*/, unsigned *number/*out*/); GTPARSER_EXPORTS const wchar_t *gt_scan_hex64_w_z(const wchar_t *s/*'\0'-terminated*/, unsigned INT64_TYPE *number/*out*/); #ifdef __cplusplus } #endif #endif /* INT_SCANNER_W_H_INCLUDED */
//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by pmp300.rc // // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 100 #define _APS_NEXT_COMMAND_VALUE 40000 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 100 #endif #endif
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* * event.c * * Created on: 18.08.2010 * Author: Umer Kayani <u.kayani@tarent.de>, * Peter Neuhaus <p.neuhaus@tarent.de>, * Andreas Grau <a.grau@tarent.de> */ /* * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA */ #include "event.h" #include "../logging.h" /** * Initialize I_event. */ I_event* new_i_event (void) { I_event* i_event = g_new0 (I_event, 1); i_event->incidence = new_i_incidence(); return i_event; } /** * free function for I_event objects */ void free_i_event (I_event **i_event) { if (i_event && *i_event) { I_event *ie = *i_event; free_i_incidence (&ie->incidence); free_date_or_datetime(&ie->end_date); g_free(ie); *i_event = NULL; } } /** * print function for debugging */ void print_i_event (const I_event *i_event) { log_debug ("\n**************************** Printing I_event ********************\n"); if (i_event) { if (i_event->incidence) print_incidence (i_event->incidence); log_debug ("\nshow_time_as: %d", i_event->show_time_as); print_date_or_datetime (i_event->end_date, "End Date"); } else log_debug ("\nI_event is NULL."); }
/******************************************************************************** Copyright (c) 2012, Francisco Claude,Roberto Konow All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of libcds nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************************/ #ifndef SRC_IMMUTABLE_MAPPERNONE_H_ #define SRC_IMMUTABLE_MAPPERNONE_H_ #include <libcds2/libcds.h> #include <libcds2/io.h> #include <libcds2/immutable/mapper.h> namespace cds { namespace immutable { using std::ostream; using std::istream; /** Mapper that doesn't change the value (identity) * * @author Francisco Claude */ class MapperNone : public Mapper { public: MapperNone(); virtual ~MapperNone() {} virtual cds_word Map(cds_word s) const; virtual cds_word Unmap(cds_word s) const; virtual cds_word GetSize() const; virtual void Save(ostream &out) const; static MapperNone *Load(istream &input); }; }; }; #endif // SRC_IMMUTABLE_MAPPERNONE_H_
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2014 Colin Walters <walters@verbum.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #pragma once #include <ostree.h> G_BEGIN_DECLS gboolean ot_admin_instutil_builtin_selinux_ensure_labeled (int argc, char **argv, OstreeSysroot *sysroot, GCancellable *cancellable, GError **error); gboolean ot_admin_instutil_builtin_set_kargs (int argc, char **argv, OstreeSysroot *sysroot, GCancellable *cancellable, GError **error); G_END_DECLS
// MonoSLAM.h : MonoSLAM 应用程序的主头文件 // #pragma once #ifndef __AFXWIN_H__ #error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件" #endif #include "resource.h" // 主符号 // CMonoSLAMApp: // 有关此类的实现,请参阅 MonoSLAM.cpp // class CMonoSLAMApp : public CWinApp { public: CMonoSLAMApp(); // 重写 public: virtual BOOL InitInstance(); // 实现 afx_msg void OnAppAbout(); DECLARE_MESSAGE_MAP() }; extern CMonoSLAMApp theApp;
/* SHT2x - A Humidity Library for Arduino. Supported Sensor modules: SHT21-Breakout Module - http://www.moderndevice.com/products/sht21-humidity-sensor SHT2x-Breakout Module - http://www.misenso.com/products/001 Created by Christopher Ladden at Modern Device on December 2009. Modified by www.misenso.com on October 2011: - code optimisation - compatibility with Arduino 1.0 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SHT2X_H #define SHT2X_H #include <inttypes.h> typedef enum { eSHT2xAddress = 0x40 } HUM_SENSOR_T; typedef enum { eTempHoldCmd = 0xE3, eRHumidityHoldCmd = 0xE5, eTempNoHoldCmd = 0xF3, eRHumidityNoHoldCmd = 0xF5, } HUM_MEASUREMENT_CMD_T; class SHT2xClass { private: uint16_t readSensor(uint8_t command); public: float GetHumidity(void); float GetTemperature(void); }; extern SHT2xClass SHT2x; #endif
/* * tslib/plugins/one-wire-ts-input-raw.c * * source: http://www.friendlyarm.net/forum/topic/3366 * SPDX-License-Identifier: LGPL-2.1 */ #include <termios.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <linux/fs.h> #include <errno.h> #include <string.h> #include <sys/utsname.h> #include <time.h> #include "config.h" #include "tslib-private.h" static int misc_read(struct tslib_module_info *inf, struct ts_sample *samp, int nr) { struct tsdev *ts = inf->dev; int ret, i; unsigned int ts_status; for (i = 0; i < nr; i++) { ret = read(ts->fd, &ts_status, sizeof ts_status); if (ret < 0) return i; if (!ret) return i; samp->x = ((ts_status) >> 16) & 0x7FFF; samp->y = ts_status & 0x7FFF; samp->pressure = ts_status >> 31; gettimeofday(&samp->tv,NULL); samp++; } return nr; } static int misc_read_mt(struct tslib_module_info *inf, struct ts_sample_mt **samp, int max_slots, int nr) { struct tsdev *ts = inf->dev; int ret, i; unsigned int ts_status; if (max_slots > 1) { #ifdef DEBUG printf("only one slot supported\n"); #endif max_slots = 1; } for (i = 0; i < nr; i++) { ret = read(ts->fd, &ts_status, sizeof ts_status); if (ret < 0) return i; if (!ret) return i; samp[i][0].x = ((ts_status) >> 16) & 0x7FFF; samp[i][0].y = ts_status & 0x7FFF; samp[i][0].pressure = ts_status >> 31; samp[i][0].valid |= TSLIB_MT_VALID; gettimeofday(&samp[i][0].tv, NULL); } return nr; } static int ts_fini(struct tslib_module_info *inf) { free(inf); return 0; } static const struct tslib_ops misc_ops = { .read = misc_read, .read_mt = misc_read_mt, .fini = ts_fini, }; TSAPI struct tslib_module_info *one_wire_ts_input_mod_init(__attribute__ ((unused)) struct tsdev *dev, __attribute__ ((unused)) const char *params) { struct tslib_module_info *m; m = malloc(sizeof(struct tslib_module_info)); if (m == NULL) return NULL; m->ops = &misc_ops; return m; } #ifndef TSLIB_STATIC_ONE_WIRE_TS_INPUT_MODULE TSLIB_MODULE_INIT(one_wire_ts_input_mod_init); #endif
// This file is part of "Watt" // // "Watt" is free software: you can redistribute it and/or modify // it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // "Watt" is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU LESSER GENERAL PUBLIC LICENSE for more details. // // You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE // along with "Watt" If not, see <http://www.gnu.org/licenses/> // // Watt.h // // Created by Benoit Pereira da Silva on 17/05/13. // Copyright (c) 2013 Pereira da Silva. All rights reserved. #import "WattDefinitions.h" // To control if added object have the good type at runtime // #define __WT_COLLECTION_ADDITION_RUNTINE_TYPE_CHECKING #ifndef __WT_LOG #define __WT_LOG 1 // You can set up WT_LOG to 1 or 0 typedef enum logNatures{ WT_LOG_DEBUG=0, WT_LOG_RUNTIME=1, }LogNature; #if __WT_LOG #define WTLogNF(nature,format, ... ){\ NSLog( @"WT(%i):%s line:%d:{\n%@\n}\n",\ nature,\ __PRETTY_FUNCTION__,\ __LINE__ ,\ [NSString stringWithFormat:(format), ##__VA_ARGS__]\ );\ } #define WTLog(format, ...){ WTLogNF(WT_LOG_DEBUG,format, ##__VA_ARGS__); } #define WTLogN(message,nature){ WTLogNF(nature,@"%@",message); } #else #define WTLogNF(nature,format, ... ){} #define WTLog(format, ...){ } #define WTLogN(message,nature){ } #endif #endif #ifndef __WT_RUNTIME_CONFIGURATION #define __WT_RUNTIME_CONFIGURATION #define selectorSetterFromPropertyName(propertyName) NSSelectorFromString([NSString stringWithFormat:@"set%@:",[propertyName capitalizedString]]) #define selectorGetterFromPropertyName(propertyName) NSSelectorFromString(propertyName) #if TARGET_OS_IPHONE #define currentOrientation() [[UIApplication sharedApplication] statusBarOrientation] #define isLandscapeOrientation() UIDeviceOrientationIsLandscape(currentOrientation()) #define isIpad()(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) #define isWidePhone() ([UIScreen mainScreen].scale == 2.f && [UIScreen mainScreen].bounds.size.height == 568.0f) #define scale() [UIScreen mainScreen].scale #endif #endif #pragma mark - Imports #import "WattObjectProtocols.h" #import "WattObject.h" #import "WattRegistry.h" #import "WattRegistryPool.h" #import "WattCollectionOfObject.h" #import "WattACL.h" #import "NSObject+WattBase.h" #import "WattObject+ExternalReference.h" #pragma mark - generated imports #import "WattImports.h"
#include "gcrc.h" uint64 gcrc64rfl(uint64 crc, const char* data, long len, const uint64 table[256]) { const unsigned char* ptr = (const unsigned char*)data; while (len-- > 0) crc = table[(crc ^ *ptr++) & 0xff] ^ (crc >> 8); return crc; }
/*****************************************************************************/ /* ### */ /* ##### ### ### ### CREATE: 2009-12-16 */ /* ####### ### ### [CORE] ### ~~~~~~~~~~~~~~~~~~ */ /* ######## ### ### ### MODIFY: XXXX-XX-XX */ /* #### ## ### ### ### ~~~~~~~~~~~~~~~~~~ */ /* ### ### ### ### ### #### #### ### ## +-----------+ */ /* #### ######## ########## ####### ###### ### ### | A NEW C | */ /* ### ######## ########## ######## ###### ### ### | FRAMEWORK | */ /* ### ## #### ### ########## ### ### ### ###### | FOR ALL | */ /* #### ### ### ### ### ### ### ### ### ###### | PLATFORMS | */ /* ########## ### ### ### ######## ####### ####### | AND ALL | */ /* ####### ### ### ### ######## ###### ### ### | COMPILERS | */ /* ##### ### ### ### #### ## #### ### ## +-----------+ */ /* ======================================================================= */ /* >>>>>>>>>>>>>>>>>>>>>>>> CrHack 应用程序函数库 <<<<<<<<<<<<<<<<<<<<<<<< */ /* ======================================================================= */ /*****************************************************************************/ #include "applib.h" #include "msclib.h" /* 应用程序相关全局变量 */ quit_t g_quit_now = NULL; /* 自定义的退出函数 */ uint_t g_app_type = CR_APP_GUI; /* 应用程序类型指定 */ hwnd_t g_gui_hwnd = NULL; /* 应用程序窗口句柄 */ msgboxA_t g_msg_boxA = NULL; /* 自定义消息窗口回调A */ msgboxW_t g_msg_boxW = NULL; /* 自定义消息窗口回调W */ uint_t g_codepage = CR_UTF8; /* 默认使用 UTF-8 编码 */ /* 外挂的编码转换函数 */ cr_acp2uni_t g_str_acp2uni = NULL; cr_uni2acp_t g_str_uni2acp = NULL; /* ======================================= 设置退出回调 ======================================= */ CR_API void_t quit_set ( __CR_IN__ quit_t func ) { g_quit_now = func; } /* ======================================= 设置 GUI 窗口句柄 ======================================= */ CR_API void_t set_gui_hwnd ( __CR_IN__ hwnd_t hwnd ) { g_gui_hwnd = hwnd; } /* ======================================= 设置消息提示调用A ======================================= */ CR_API void_t set_msg_callA ( __CR_IN__ msgboxA_t func ) { g_msg_boxA = func; } /* ======================================= 设置消息提示调用W ======================================= */ CR_API void_t set_msg_callW ( __CR_IN__ msgboxW_t func ) { g_msg_boxW = func; } /* ======================================= 设置系统本地编码值 ======================================= */ CR_API void_t set_sys_codepage ( __CR_IN__ uint_t cpage ) { if (cpage != CR_LOCAL) g_codepage = cpage; } /* ======================================= 设置 str_acp2uni 外挂 ======================================= */ CR_API void_t set_str_acp2uni ( __CR_IN__ cr_acp2uni_t func ) { g_str_acp2uni = func; } /* ======================================= 设置 str_uni2acp 外挂 ======================================= */ CR_API void_t set_str_uni2acp ( __CR_IN__ cr_uni2acp_t func ) { g_str_uni2acp = func; } /* ======================================= 计算 Tick 时间差 ======================================= */ CR_API int32u timer_delta32 ( __CR_IN__ int32u base ) { int32u now = timer_get32(); if (now < base) return (0xFFFFFFFFUL - base + now + 1); return (now - base); } /* ======================================= 延时一段时间 ======================================= */ CR_API void_t delayms ( __CR_IN__ byte_t num ) { int32u time = (int32u)num; int32u base = timer_get32(); while (timer_delta32(base) < time); } /*****************************************************************************/ /* _________________________________________________________________________ */ /* uBMAzRBoAKAHaACQD6FoAIAPqbgA/7rIA+5CM9uKw8D4Au7u7mSIJ0t18mYz0mYz9rAQZCgHc */ /* wRIZIgHZovGBXUAZg+v0GbB+gRmgcJ7BAAAisIlAwB1Av7LSHUC/s9IdQL+w0h1Av7HZkZmgf */ /* 4JLgIAdb262gPsqAh0+zP/uQB9ZYsFZYktq+L3sMi/AAK7gAKJAUtLdfq5IANXvT8BiQzfBIv */ /* FLaAAweAEmff53wb+Adjx3kQE2xwy5Io8ithkigcFgACJBN8E3sneNvwB2xyLHDkdfA2JHSyA */ /* adtAAQPdZYgHR0dNdbZfSYP5UHWr/kQEtAHNFg+Eef/DWAKgDw== |~~~~~~~~~~~~~~~~~~~ */ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> END OF FILE <<< */ /*****************************************************************************/
// // // The Laxkit, a windowing toolkit // Please consult http://laxkit.sourceforge.net about where to send any // correspondence about this software. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // Copyright (C) 2013-2014 by Tom Lechner // #ifndef _LAX_CURVEWINDOW_H #define _LAX_CURVEWINDOW_H #include <lax/anxapp.h> #include <lax/rectangles.h> #include <lax/buttondowninfo.h> #include <lax/interfaces/curvemapinterface.h> namespace LaxInterfaces { enum CurveWindowStyles { CURVE_Show_Ranges=(1<<15), }; class CurveWindow : public Laxkit::anXWindow { protected: CurveMapInterface interface; public: int padouter, padinner; unsigned int curve_color; unsigned int graph_color; unsigned int editable; //mask of enum curvewindoweditable CurveWindow(anXWindow *parnt,const char *nname,const char *ntitle,unsigned long nstyle, int xx,int yy,int ww,int hh,int brder, anXWindow *prev, unsigned long nowner, const char *nsend, const char *nctitle=NULL, const char *xl=NULL, double nxmin=0, double nxmax=1, const char *yl=NULL, double nymin=0, double nymax=1); virtual ~CurveWindow(); virtual const char *whattype() { return "CurveWindow"; } virtual int init(); virtual void Refresh(); virtual int LBDown(int x,int y,unsigned int state,int count,const Laxkit::LaxMouse *d); virtual int LBUp(int x,int y,unsigned int state,const Laxkit::LaxMouse *d); virtual int WheelUp(int x,int y,unsigned int state,int count,const Laxkit::LaxMouse *d); virtual int WheelDown(int x,int y,unsigned int state,int count,const Laxkit::LaxMouse *d); virtual int MouseMove(int x,int y,unsigned int state,const Laxkit::LaxMouse *d); virtual int CharInput(unsigned int ch, const char *buffer,int len,unsigned int state, const Laxkit::LaxKeyboard *d); virtual int MoveResize(int nx,int ny,int nw,int nh); virtual int Resize(int nw,int nh); virtual int Event(const Laxkit::EventData *e,const char *mes); virtual void ChangeEditable(unsigned int which, int on); //serializing aids virtual LaxFiles::Attribute *dump_out_atts(LaxFiles::Attribute *att,int what,LaxFiles::DumpContext *context); virtual void dump_in_atts(LaxFiles::Attribute *att,int flag,LaxFiles::DumpContext *context); //curve specific functions: virtual void SetupRect(); //virtual int scaneditable(int x,int y); //virtual int scan(int x,int y); //virtual int scannear(int x,int y, flatpoint *p_ret, int *index); virtual int MakeLookupTable(int *table,int numentries, int minvalue, int maxvalue); virtual double f(double x); virtual Laxkit::CurveInfo *GetInfo() { return interface.GetInfo(); } virtual int SetInfo(Laxkit::CurveInfo *info); virtual int CopyInfo(Laxkit::CurveInfo *info); virtual int AddPoint(double x,double y); virtual int MovePoint(int index, double x,double y); virtual void Reset(); }; } // namespace LaxInterfaces #endif
/* BEGIN_COMMON_COPYRIGHT_HEADER * (c)LGPL2+ * * LXQt - The Lightweight Desktop Environment * http://lxqt.org * * Copyright: 2012 Razor team * 2013-2014 LXQt team * Authors: * Alexander Sokoloff <sokoloff.a@gmail.com> * * This program or library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA * * END_COMMON_COPYRIGHT_HEADER */ #ifndef LXQTMOUNT_LXQTMOUNT_H #define LXQTMOUNT_LXQTMOUNT_H #include <QtCore/QObject> #include <QtCore/QList> #include <QtGlobal> #ifdef COMPILE_LIBLXQT_MOUNT #define LIBLXQT_MOUNT_API Q_DECL_EXPORT #else #define LIBLXQT_MOUNT_API Q_DECL_IMPORT #endif #define BOOL_SETTER(MEMBER) { bool res=(value != MEMBER); MEMBER = value; return res; } namespace LxQt { class MountProvider; class LIBLXQT_MOUNT_API MountDevice: public QObject { Q_OBJECT public: enum MediaType { MediaTypeUnknown, MediaTypeDrive, MediaTypePartition, MediaTypeFdd, MediaTypeOptical }; virtual bool mount() = 0; virtual bool unmount() = 0; virtual bool eject() = 0; QString devFile() const { return mDevFile; } QString label() const { return mLabel; } QString vendor() const { return mVendor; } QString model() const { return mModel; } QString fileSystem() const { return mFileSystem; } QString mountPath() const { return mMountPath; } QString iconName() const { return mIconName; } qulonglong size() const { return mSize; } MediaType mediaType() const { return mMediaType; } bool isValid() const { return mIsValid; } bool isExternal() const { return mIsExternal; } bool isMounted() const { return mIsMounted; } bool isEjectable() const { return mIsEjectable; } static QString sizeToString(qulonglong size); signals: void changed(); void error(const QString &msg); void mounted(); void unmounted(); protected: explicit MountDevice(); bool setDevFile(const QString &value) BOOL_SETTER(mDevFile) bool setLabel(const QString &value) BOOL_SETTER(mLabel) bool setVendor(const QString &value) BOOL_SETTER(mVendor) bool setModel(const QString &value) BOOL_SETTER(mModel) bool setFileSystem(const QString &value) BOOL_SETTER(mFileSystem) bool setMountPath(const QString &value) BOOL_SETTER(mMountPath) bool setIconName(const QString &value) BOOL_SETTER(mIconName) bool setSize(qulonglong value) BOOL_SETTER(mSize) bool setMediaType(MediaType value) BOOL_SETTER(mMediaType) bool setIsValid(bool value) BOOL_SETTER(mIsValid) bool setIsExternal(bool value) BOOL_SETTER(mIsExternal) bool setIsMounted(bool value) BOOL_SETTER(mIsMounted) bool setIsEjectable(bool value) BOOL_SETTER(mIsEjectable) QString mDevFile; QString mLabel; QString mVendor; QString mModel; QString mFileSystem; QString mMountPath; QString mIconName; qulonglong mSize; MediaType mMediaType; bool mIsValid; bool mIsExternal; bool mIsMounted; bool mIsEjectable; private: Q_DISABLE_COPY(MountDevice) }; typedef QList<MountDevice*> MountDeviceList; class LIBLXQT_MOUNT_API MountManager : public QObject { Q_OBJECT public: explicit MountManager(QObject *parent = 0); virtual ~MountManager(); const MountDeviceList devices() const; public slots: void update(); signals: void deviceAdded(LxQt::MountDevice *device); void deviceRemoved(LxQt::MountDevice *device); void deviceChanged(LxQt::MountDevice *device); private: MountProvider *mProvider; }; } // namespace LxQt LIBLXQT_MOUNT_API QDebug operator<<(QDebug dbg, const LxQt::MountDevice& device); LIBLXQT_MOUNT_API QDebug operator<<(QDebug dbg, const LxQt::MountDevice* const device); #endif // LXQTMOUNT_LXQTMOUNT_H
#include <stdlib.h> #include <string.h> #include "org_herac_tuxguitar_player_impl_midiport_lv2_jni_LV2.h" #include "org_herac_tuxguitar_player_impl_midiport_lv2_jni_LV2World.h" JNIEXPORT jlong JNICALL Java_org_herac_tuxguitar_player_impl_midiport_lv2_jni_LV2World_malloc(JNIEnv *env, jobject obj) { jlong ptr = 0; LV2World *handle = (LV2World *) malloc(sizeof(LV2World)); handle->lilvWorld = lilv_world_new(); lilv_world_load_all(handle->lilvWorld); memcpy(&ptr, &handle, sizeof( handle )); return ptr; } JNIEXPORT void JNICALL Java_org_herac_tuxguitar_player_impl_midiport_lv2_jni_LV2World_free(JNIEnv *env, jobject obj, jlong ptr) { LV2World *handle = NULL; memcpy(&handle, &ptr, sizeof(handle)); if( handle != NULL ){ if( handle->lilvWorld != NULL ){ lilv_world_free(handle->lilvWorld); handle->lilvWorld = NULL; } free ( handle ); } } JNIEXPORT jobject JNICALL Java_org_herac_tuxguitar_player_impl_midiport_lv2_jni_LV2World_getLilvPlugins(JNIEnv *env, jobject obj, jlong ptr) { jobject jlist = NULL; LV2World *handle = NULL; memcpy(&handle, &ptr, sizeof(handle)); if( handle != NULL && handle->lilvWorld != NULL ) { jclass jlistCls = NULL; jclass jlongCls = NULL; jmethodID jlistInit = NULL; jmethodID jlistAddMid = NULL; jmethodID jlongInit = NULL; jlistCls = (*env)->FindClass(env, "java/util/ArrayList"); if( jlistCls != NULL ) { jlistInit = (*env)->GetMethodID(env, jlistCls, "<init>", "()V"); jlistAddMid = (*env)->GetMethodID(env, jlistCls, "add", "(Ljava/lang/Object;)Z"); if( jlistInit != NULL && jlistAddMid != NULL) { jlist = (*env)->NewObject(env, jlistCls, jlistInit); } } jlongCls = (*env)->FindClass(env, "java/lang/Long"); if( jlongCls != NULL ) { jlongInit = (*env)->GetMethodID(env, jlongCls, "<init>", "(J)V"); } if( jlist != NULL && jlistAddMid != NULL && jlongCls != NULL && jlongInit != NULL ) { const LilvPlugins* lilvPlugins = lilv_world_get_all_plugins(handle->lilvWorld); if( lilvPlugins ) { LILV_FOREACH(plugins, itr, lilvPlugins) { const LilvPlugin *lilvPlugin = lilv_plugins_get(lilvPlugins, itr); jlong lilvPluginAddress = 0; memcpy(&lilvPluginAddress, &lilvPlugin, sizeof(lilvPlugin)); jobject lilvPluginAddressObj = (*env)->NewObject(env, jlongCls, jlongInit, lilvPluginAddress); (*env)->CallBooleanMethod(env, jlist, jlistAddMid, lilvPluginAddressObj); } } } } return jlist; }
/* GStreamer Made Simple * Copyright (C) 2014 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef __GMS_UTILS_H__ #define __GMS_UTILS_H__ #include <glib.h> #include <gst/gst.h> G_BEGIN_DECLS gboolean gms_generate_test_file_audio_video_sync (const gchar * location, const gchar * audio_encoder, const gchar * video_encoder, const gchar * muxer, const gchar * video_pattern, const gchar * audio_wave, gint duration); G_END_DECLS #endif /* __GMS_UTILS_H__ */
/* $TOG: miscanfill.h /main/6 1998/02/09 14:48:35 kaleb $ */ /* Copyright 1987, 1998 The Open Group All Rights Reserved. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef SCANFILLINCLUDED #define SCANFILLINCLUDED /* * scanfill.h * * Written by Brian Kelleher; Jan 1985 * * This file contains a few macros to help track * the edge of a filled object. The object is assumed * to be filled in scanline order, and thus the * algorithm used is an extension of Bresenham's line * drawing algorithm which assumes that y is always the * major axis. * Since these pieces of code are the same for any filled shape, * it is more convenient to gather the library in one * place, but since these pieces of code are also in * the inner loops of output primitives, procedure call * overhead is out of the question. * See the author for a derivation if needed. */ /* * In scan converting polygons, we want to choose those pixels * which are inside the polygon. Thus, we add .5 to the starting * x coordinate for both left and right edges. Now we choose the * first pixel which is inside the pgon for the left edge and the * first pixel which is outside the pgon for the right edge. * Draw the left pixel, but not the right. * * How to add .5 to the starting x coordinate: * If the edge is moving to the right, then subtract dy from the * error term from the general form of the algorithm. * If the edge is moving to the left, then add dy to the error term. * * The reason for the difference between edges moving to the left * and edges moving to the right is simple: If an edge is moving * to the right, then we want the algorithm to flip immediately. * If it is moving to the left, then we don't want it to flip until * we traverse an entire pixel. */ #define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \ int dx; /* local storage */ \ \ /* \ * if the edge is horizontal, then it is ignored \ * and assumed not to be processed. Otherwise, do this stuff. \ */ \ if ((dy) != 0) { \ xStart = (x1); \ dx = (x2) - xStart; \ if (dx < 0) { \ m = dx / (dy); \ m1 = m - 1; \ incr1 = -2 * dx + 2 * (dy) * m1; \ incr2 = -2 * dx + 2 * (dy) * m; \ d = 2 * m * (dy) - 2 * dx - 2 * (dy); \ } else { \ m = dx / (dy); \ m1 = m + 1; \ incr1 = 2 * dx - 2 * (dy) * m1; \ incr2 = 2 * dx - 2 * (dy) * m; \ d = -2 * m * (dy) + 2 * dx; \ } \ } \ } #define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \ if (m1 > 0) { \ if (d > 0) { \ minval += m1; \ d += incr1; \ } \ else { \ minval += m; \ d += incr2; \ } \ } else {\ if (d >= 0) { \ minval += m1; \ d += incr1; \ } \ else { \ minval += m; \ d += incr2; \ } \ } \ } /* * This structure contains all of the information needed * to run the bresenham algorithm. * The variables may be hardcoded into the declarations * instead of using this structure to make use of * register declarations. */ typedef struct { int minor; /* minor axis */ int d; /* decision variable */ int m, m1; /* slope and slope+1 */ int incr1, incr2; /* error increments */ } BRESINFO; #define BRESINITPGONSTRUCT(dmaj, min1, min2, bres) \ BRESINITPGON(dmaj, min1, min2, bres.minor, bres.d, \ bres.m, bres.m1, bres.incr1, bres.incr2) #define BRESINCRPGONSTRUCT(bres) \ BRESINCRPGON(bres.d, bres.minor, bres.m, bres.m1, bres.incr1, bres.incr2) #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_PUTACCOUNTSETTINGDEFAULTRESPONSE_P_H #define QTAWS_PUTACCOUNTSETTINGDEFAULTRESPONSE_P_H #include "ecsresponse_p.h" namespace QtAws { namespace ECS { class PutAccountSettingDefaultResponse; class PutAccountSettingDefaultResponsePrivate : public EcsResponsePrivate { public: explicit PutAccountSettingDefaultResponsePrivate(PutAccountSettingDefaultResponse * const q); void parsePutAccountSettingDefaultResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(PutAccountSettingDefaultResponse) Q_DISABLE_COPY(PutAccountSettingDefaultResponsePrivate) }; } // namespace ECS } // namespace QtAws #endif
/*! @file @author Albert Semenov @date 07/2012 */ #ifndef _f96377f4_5267_4e1d_a47b_7f8f402870c4_ #define _f96377f4_5267_4e1d_a47b_7f8f402870c4_ #include "MyGUI.h" namespace MyGUI { namespace utility { template<> inline std::string toString<UString>(UString _value) { return _value; } template<> inline UString parseValue<UString>(const std::string& _value) { return _value; } template<> inline bool parseComplex<UString>(const std::string& _value, UString& _p1) { _p1 = _value; return true; } } } #endif
/* * vala-panel * Copyright (C) 2015-2018 Konstantin Pugin <ria.freelander@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef APPLETMANAGER_H #define APPLETMANAGER_H #include "applet-info.h" #include "applet-widget-api.h" #include <gio/gio.h> #include <gtk/gtk.h> G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(ValaPanelAppletManager, vp_applet_manager, VP, APPLET_MANAGER, GObject) typedef struct { ValaPanelAppletInfo *info; uint count; } AppletInfoData; G_GNUC_INTERNAL ValaPanelAppletManager *vp_applet_manager_new(void); G_GNUC_INTERNAL void vp_applet_manager_applet_unref(ValaPanelAppletManager *self, const char *name); G_GNUC_INTERNAL ValaPanelApplet *vp_applet_manager_get_applet_widget(ValaPanelAppletManager *self, const char *type, ValaPanelToplevel *top, ValaPanelUnitSettings *s); G_GNUC_INTERNAL ValaPanelAppletInfo *vp_applet_manager_get_applet_info( ValaPanelAppletManager *self, ValaPanelApplet *pl, ValaPanelCoreSettings *core_settings); G_GNUC_INTERNAL void vp_applet_manager_reload_applets(ValaPanelAppletManager *self); G_GNUC_INTERNAL GList *vp_applet_manager_get_all_types(ValaPanelAppletManager *self); G_GNUC_INTERNAL bool vp_applet_manager_is_applet_available(ValaPanelAppletManager *self, const char *module_name); G_END_DECLS #endif // APPLETMANAGER_H
/* * The libuna header wrapper * * Copyright (C) 2011-2022, Joachim Metz <joachim.metz@gmail.com> * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #if !defined( _VSHADOWTOOLS_LIBUNA_H ) #define _VSHADOWTOOLS_LIBUNA_H #include <common.h> /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include <libuna_base16_stream.h> #include <libuna_base32_stream.h> #include <libuna_base64_stream.h> #include <libuna_byte_stream.h> #include <libuna_unicode_character.h> #include <libuna_url_stream.h> #include <libuna_utf16_stream.h> #include <libuna_utf16_string.h> #include <libuna_utf32_stream.h> #include <libuna_utf32_string.h> #include <libuna_utf7_stream.h> #include <libuna_utf8_stream.h> #include <libuna_utf8_string.h> #include <libuna_types.h> #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES ) #define LIBUNA_DLL_IMPORT #endif #include <libuna.h> #endif /* defined( HAVE_LOCAL_LIBUNA ) */ #endif /* !defined( _VSHADOWTOOLS_LIBUNA_H ) */
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEVIRTUALCLUSTERRESPONSE_P_H #define QTAWS_DELETEVIRTUALCLUSTERRESPONSE_P_H #include "emrcontainersresponse_p.h" namespace QtAws { namespace EMRContainers { class DeleteVirtualClusterResponse; class DeleteVirtualClusterResponsePrivate : public EMRContainersResponsePrivate { public: explicit DeleteVirtualClusterResponsePrivate(DeleteVirtualClusterResponse * const q); void parseDeleteVirtualClusterResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(DeleteVirtualClusterResponse) Q_DISABLE_COPY(DeleteVirtualClusterResponsePrivate) }; } // namespace EMRContainers } // namespace QtAws #endif
/* This file is part of PyMesh. Copyright (c) 2015 by Qingnan Zhou */ #pragma once #include <../BooleanEngine.h> class CorkEngine : public BooleanEngine { public: virtual ~CorkEngine(); public: virtual void compute_union(); virtual void compute_intersection(); virtual void compute_difference(); virtual void compute_symmetric_difference(); };
/* * Universidade Federal de Campina Grande * Centro de Engenharia Elétrica e Informática * Laboratório de Sistemas Embarcados e Computação Pervasiva * BRisa / BRisa-Qt - http://brisa.garage.maemo.org * Filename: brisaconfig.cpp * Created: * Description: Definition of BrisaWebserver class. * Authors: Andre Dieb Martins <andre.dieb@gmail.com> @since 2009 * Leandro Melo de Sales <leandroal@gmail.com> @since 2009-2010 * Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> @since 2010 * * * Copyright (C) <2009> <Embbeded Systems and Pervasive Computing Laboratory> * * BRisa-Qt is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #ifndef _BRISAWEBSERVER_H #define _BRISAWEBSERVER_H #include <QtCore> #include <QtNetwork> #include "brisaglobal.h" #include "httpserver.h" namespace Brisa { /*! * \brief The BrisaWebserver class is a web server implementation. * * BrisaWebServer implements a Web Server using libQxt. */ class BrisaWebService; class BrisaWebserverSession; class BRISA_CORE_EXPORT BrisaWebserver: public HttpServer { Q_OBJECT public: BrisaWebserver(const QHostAddress &host, quint16 port); ~BrisaWebserver(); void addService(QByteArray path, BrisaWebService *service); void removeService(QByteArray path); BrisaWebService *service(QByteArray path) const; protected: HttpServerFactory &factory(); private: class Factory: public HttpServerFactory { public: Factory(BrisaWebserver *server) : server(server) {} HttpSession *generateSessionHandler(HttpSessionManager *parent); private: BrisaWebserver *server; } m_factory; // QHash and QList are reentrant, not thread-safe mutable QMutex mutex; QHash<QByteArray, BrisaWebService *> services; }; } #endif /* _BRISAWEBSERVER_H */
// 2018-07-05T12:57+08:00 #ifndef BUBBLE_SORT_H_INCLUDED #define BUBBLE_SORT_H_INCLUDED void bubble_sorti(int arr[], int n); void optimized_bubble_sorti(int arr[], int n); #endif // BUBBLE_SORT_H_INCLUDED
/******************************************************************************* * Copyright (c) 2012 Aurelien Bourdon. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * Aurelien Bourdon - initial API and implementation ******************************************************************************/ #ifndef TESTUTIL_H_ #define TESTUTIL_H_ #include <QtCore> #define PROJECT_TESTING_BINARY_DIR "/home/abourdon/dev/esf/esf-lib/formulas/esf-network-formula-build/testing_launchers" class TestUtil { public: static const QString getAbsoluteTestingPath(); }; inline const QString TestUtil::getAbsoluteTestingPath() { return PROJECT_TESTING_BINARY_DIR; } #endif /* TESTUTIL_H_ */
// Created file "Lib\src\Uuid\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(ENHANCED_STORAGE_CAPABILITY_RENDER_USER_DATA_UNUSABLE, 0x91248166, 0xb832, 0x4ad4, 0xba, 0xa4, 0x7c, 0xa0, 0xb6, 0xb2, 0x79, 0x8c);
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEPROFILINGGROUPRESPONSE_H #define QTAWS_DELETEPROFILINGGROUPRESPONSE_H #include "codeguruprofilerresponse.h" #include "deleteprofilinggrouprequest.h" namespace QtAws { namespace CodeGuruProfiler { class DeleteProfilingGroupResponsePrivate; class QTAWSCODEGURUPROFILER_EXPORT DeleteProfilingGroupResponse : public CodeGuruProfilerResponse { Q_OBJECT public: DeleteProfilingGroupResponse(const DeleteProfilingGroupRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const DeleteProfilingGroupRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeleteProfilingGroupResponse) Q_DISABLE_COPY(DeleteProfilingGroupResponse) }; } // namespace CodeGuruProfiler } // namespace QtAws #endif
// Created file "Lib\src\dxguid\d3d9guid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(GUID_PROCESSOR_PARKING_PERF_STATE, 0x447235c7, 0x6a8d, 0x4cc0, 0x8e, 0x24, 0x9e, 0xaf, 0x70, 0xb9, 0x6e, 0x2b);
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DESCRIBESCHEDULEDACTIONSREQUEST_P_H #define QTAWS_DESCRIBESCHEDULEDACTIONSREQUEST_P_H #include "redshiftrequest_p.h" #include "describescheduledactionsrequest.h" namespace QtAws { namespace Redshift { class DescribeScheduledActionsRequest; class DescribeScheduledActionsRequestPrivate : public RedshiftRequestPrivate { public: DescribeScheduledActionsRequestPrivate(const RedshiftRequest::Action action, DescribeScheduledActionsRequest * const q); DescribeScheduledActionsRequestPrivate(const DescribeScheduledActionsRequestPrivate &other, DescribeScheduledActionsRequest * const q); private: Q_DECLARE_PUBLIC(DescribeScheduledActionsRequest) }; } // namespace Redshift } // namespace QtAws #endif
/* * Support functions * * Copyright (c) 2008-2014, Joachim Metz <joachim.metz@gmail.com> * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see <http://www.gnu.org/licenses/>. */ #if !defined( _LIBUNA_SUPPORT_H ) #define _LIBUNA_SUPPORT_H #include <common.h> #include <types.h> #include <stdio.h> #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBUNA ) LIBUNA_EXTERN \ const char *libuna_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #if defined( __cplusplus ) } #endif #endif
/* * The libclocale header wrapper * * Copyright (C) 2008-2022, Joachim Metz <joachim.metz@gmail.com> * * Refer to AUTHORS for acknowledgements. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #if !defined( _LIBCDIRECTORY_LIBCLOCALE_H ) #define _LIBCDIRECTORY_LIBCLOCALE_H #include <common.h> /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include <libclocale_codepage.h> #include <libclocale_definitions.h> #include <libclocale_locale.h> #include <libclocale_support.h> #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include <libclocale.h> #endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */ #endif /* !defined( _LIBCDIRECTORY_LIBCLOCALE_H ) */
/* * QuarkPlayer, a Phonon media player * Copyright (C) 2006-2008 Ricardo Villalba <rvm@escomposlinux.org> * Copyright (C) 2008 Kamil Dziobek <turbos11@gmail.com> * Copyright (C) 2008 Tanguy Krotoff <tkrotoff@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef OPENSUBTITLESPARSER_H #define OPENSUBTITLESPARSER_H #include <QtXml/QDomDocument> #include <QtCore/QObject> #include <QtCore/QByteArray> #include <QtCore/QList> struct OpenSubtitlesSubtitle { QString movie; QString releasename; QString link; QString iso639; QString language; QString date; QString format; QString comments; QString detail; QString rating; QString files; QString user; }; /** * Parses the web service from the website http://www.opensubtitles.org * * http://www.opensubtitles.org gives us a subtitle file given a movie filename. * * Source code taken from SMPlayer, original author: Ricardo Villalba * * @author Ricardo Villalba * @author Tanguy Krotoff */ class OpenSubtitlesParser { public: OpenSubtitlesParser(); ~OpenSubtitlesParser(); bool parseXml(const QByteArray & xml); QList<OpenSubtitlesSubtitle> subtitleList() const; /** * Patch by Kamil Dziobek * Copyright (C) 2008 Kamil Dziobek <turbos11@gmail.com> * License: BSD or GPL or public domain */ static QString calculateHash(const QString & fileName); private: QDomDocument _doc; QList<OpenSubtitlesSubtitle> _subtitles; }; #endif //OPENSUBTITLESPARSER_H
/* Area: ffi_call, closure_call Purpose: Check structure alignment of uint32. Limitations: none. PR: none. Originator: <hos@tamanegi.org> 20031203 */ /* { dg-do run } */ #include "ffitest.h" typedef struct cls_struct_align { unsigned char a; unsigned int b; unsigned char c; } cls_struct_align; cls_struct_align cls_struct_align_fn(struct cls_struct_align a1, struct cls_struct_align a2) { struct cls_struct_align result; result.a = a1.a + a2.a; result.b = a1.b + a2.b; result.c = a1.c + a2.c; printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c); return result; } static void cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__) { struct cls_struct_align a1, a2; a1 = *(struct cls_struct_align*)(args[0]); a2 = *(struct cls_struct_align*)(args[1]); *(cls_struct_align*)resp = cls_struct_align_fn(a1, a2); } int main (void) { ffi_cif cif; void *code; ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code); void* args_dbl[5]; ffi_type* cls_struct_fields[4]; ffi_type cls_struct_type; ffi_type* dbl_arg_types[5]; cls_struct_type.size = 0; cls_struct_type.alignment = 0; cls_struct_type.type = FFI_TYPE_STRUCT; cls_struct_type.elements = cls_struct_fields; struct cls_struct_align g_dbl = { 12, 4951, 127 }; struct cls_struct_align f_dbl = { 1, 9320, 13 }; struct cls_struct_align res_dbl; cls_struct_fields[0] = &ffi_type_uchar; cls_struct_fields[1] = &ffi_type_uint; cls_struct_fields[2] = &ffi_type_uchar; cls_struct_fields[3] = NULL; dbl_arg_types[0] = &cls_struct_type; dbl_arg_types[1] = &cls_struct_type; dbl_arg_types[2] = NULL; CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type, dbl_arg_types) == FFI_OK); args_dbl[0] = &g_dbl; args_dbl[1] = &f_dbl; args_dbl[2] = NULL; ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl); /* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */ printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); /* { dg-output "\nres: 13 14271 140" } */ CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK); res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl); /* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */ printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c); /* { dg-output "\nres: 13 14271 140" } */ exit(0); }
// Created file "Lib\src\Uuid\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_PropGroup_Music, 0x68dd6094, 0x7216, 0x40f1, 0xa0, 0x29, 0x43, 0xfe, 0x71, 0x27, 0x04, 0x3f);
// Created file "Lib\src\mfuuid\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(MFNETSOURCE_UDP_PORT_RANGE, 0x3cb1f29a, 0x0505, 0x4c5d, 0xae, 0x71, 0x0a, 0x55, 0x63, 0x44, 0xef, 0xa1);
// Created file "Lib\src\amstrmid\X64\strmiids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(CODECAPI_GUID_AVEncMPEG2Audio, 0xee4cbb1f, 0x9c3f, 0x4770, 0x92, 0xb5, 0xfc, 0xb7, 0xc2, 0xa8, 0xd3, 0x81);
/* * Copyright (C) 2017 John M. Harris, Jr. <johnmh@openblox.org> * * This file is part of OpenBlox. * * OpenBlox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenBlox is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the Lesser GNU General Public License * along with OpenBlox. If not, see <https://www.gnu.org/licenses/>. */ #include "instance/LuaSourceContainer.h" #ifndef OB_INST_BASESCRIPT #define OB_INST_BASESCRIPT namespace OB{ namespace Instance{ class BaseScript: public LuaSourceContainer{ public: BaseScript(OBEngine* eng); virtual ~BaseScript(); virtual bool canRun(); virtual void runScript(); bool isDisabled(); virtual void setDisabled(bool disabled); std::string getLinkedSource(); void setLinkedSource(std::string linkedSource); #if HAVE_ENET virtual void replicateProperties(shared_ptr<NetworkReplicator> peer); #endif virtual std::map<std::string, _PropertyInfo> getProperties(); virtual shared_ptr<Type::VarWrapper> getProperty(std::string prop); virtual void setProperty(std::string prop, shared_ptr<Type::VarWrapper> val); DECLARE_LUA_METHOD(getDisabled); DECLARE_LUA_METHOD(setDisabled); DECLARE_LUA_METHOD(getLinkedSource); DECLARE_LUA_METHOD(setLinkedSource); DECLARE_LUA_METHOD(GetSource); static void register_lua_property_getters(lua_State* L); static void register_lua_property_setters(lua_State* L); static void register_lua_methods(lua_State* L); DECLARE_CLASS(BaseScript); bool Disabled; std::string LinkedSource; }; } } #endif // OB_INST_BASESCRIPT // Local Variables: // mode: c++ // End:
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: /Users/krasnocka/Downloads/j2objc-master/testing/mockito/build_result/java/org/mockito/internal/util/ObjectMethodsGuru.java // #ifndef _OrgMockitoInternalUtilObjectMethodsGuru_H_ #define _OrgMockitoInternalUtilObjectMethodsGuru_H_ @class JavaLangReflectMethod; @protocol OrgMockitoInternalInvocationMockitoMethod; #include "J2ObjC_header.h" #include "java/io/Serializable.h" #define OrgMockitoInternalUtilObjectMethodsGuru_serialVersionUID -1286718569065470494LL @interface OrgMockitoInternalUtilObjectMethodsGuru : NSObject < JavaIoSerializable > { } - (jboolean)isToStringWithJavaLangReflectMethod:(JavaLangReflectMethod *)method; - (jboolean)isToStringWithOrgMockitoInternalInvocationMockitoMethod:(id<OrgMockitoInternalInvocationMockitoMethod>)method; - (jboolean)isEqualsMethodWithJavaLangReflectMethod:(JavaLangReflectMethod *)method; - (jboolean)isHashCodeMethodWithJavaLangReflectMethod:(JavaLangReflectMethod *)method; - (jboolean)isCompareToMethodWithJavaLangReflectMethod:(JavaLangReflectMethod *)method; - (instancetype)init; @end J2OBJC_EMPTY_STATIC_INIT(OrgMockitoInternalUtilObjectMethodsGuru) CF_EXTERN_C_BEGIN J2OBJC_STATIC_FIELD_GETTER(OrgMockitoInternalUtilObjectMethodsGuru, serialVersionUID, jlong) CF_EXTERN_C_END J2OBJC_TYPE_LITERAL_HEADER(OrgMockitoInternalUtilObjectMethodsGuru) #endif // _OrgMockitoInternalUtilObjectMethodsGuru_H_
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_CREATECACHESUBNETGROUPRESPONSE_P_H #define QTAWS_CREATECACHESUBNETGROUPRESPONSE_P_H #include "elasticacheresponse_p.h" namespace QtAws { namespace ElastiCache { class CreateCacheSubnetGroupResponse; class CreateCacheSubnetGroupResponsePrivate : public ElastiCacheResponsePrivate { public: explicit CreateCacheSubnetGroupResponsePrivate(CreateCacheSubnetGroupResponse * const q); void parseCreateCacheSubnetGroupResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(CreateCacheSubnetGroupResponse) Q_DISABLE_COPY(CreateCacheSubnetGroupResponsePrivate) }; } // namespace ElastiCache } // namespace QtAws #endif
#import <Cocoa/Cocoa.h> #import "YuvOpenGLView.h" #import "GLViewBase.h" @interface MainViewController : NSViewController @property (assign) IBOutlet NSTextField* widthTextField; @property (assign) IBOutlet NSTextField* heightTextField; @property (assign) IBOutlet NSComboBox* formatComboBox; @property (assign) IBOutlet NSButton* renderButton; @property (assign) IBOutlet NSView* yuvOpenGLViewOwner; @property (assign) IBOutlet GLViewBase* yuvGLView; @property (assign) IBOutlet NSButton* test0Button; @property (assign) IBOutlet NSButton* test1Button; @property (assign) IBOutlet NSButton* test2Button; @property (assign) IBOutlet NSButton* test3Button; @property (assign) IBOutlet NSButton* test4Button; @property (assign) IBOutlet NSButton* test5Button; @property (assign) IBOutlet NSButton* test6Button; @property (nonatomic, strong) YuvOpenGLView* yuvOpenGLView; @end
/* * Copyright (C) 2013 Arnaud Ferraris. * * This file is part of AyRTOS. * * AyRTOS is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * AyRTOS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with AyRTOS. * If not, see <http://www.gnu.org/licenses/>. * */ #ifndef __AY_TIMER_AT328P_H #define __AY_TIMER_AT328P_H #include <inttypes.h> #include <avr/io.h> #include <avr/interrupt.h> void AYTickInit_AT328P(uint16_t); void AYCounterInit_AT328P(void); uint16_t AYGetMicros_AT328P(void); #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DECREASESTREAMRETENTIONPERIODRESPONSE_P_H #define QTAWS_DECREASESTREAMRETENTIONPERIODRESPONSE_P_H #include "kinesisresponse_p.h" namespace QtAws { namespace Kinesis { class DecreaseStreamRetentionPeriodResponse; class DecreaseStreamRetentionPeriodResponsePrivate : public KinesisResponsePrivate { public: explicit DecreaseStreamRetentionPeriodResponsePrivate(DecreaseStreamRetentionPeriodResponse * const q); void parseDecreaseStreamRetentionPeriodResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(DecreaseStreamRetentionPeriodResponse) Q_DISABLE_COPY(DecreaseStreamRetentionPeriodResponsePrivate) }; } // namespace Kinesis } // namespace QtAws #endif
#ifndef __CMD__LINE__H #define __CMD__LINE__H #ifndef CMD_ARGS_OPTION_FILE #define CMD_ARGS_OPTION_FILE "cmd_args.opt" #endif #define CMD_DEFINE_ARG(a, b, c, d) #include CMD_ARGS_OPTION_FILE #undef CMD_DEFINE_ARG #ifndef CMD_STRUCT_NAME #define CMD_STRUCT_NAME CmdLineArgs #endif #define CMD_DEFINE_ARG(option, type, default, help_str) type option; #define bool int #define string char * #define toggle int #ifdef CMD_TYPEDEF_STRUCT typedef struct { #else struct CMD_STRUCT_NAME { #endif #include CMD_ARGS_OPTION_FILE #ifdef CMD_TYPEDEF_STRUCT } CMD_STRUCT_NAME; #else }; #endif #undef CMD_DEFINE_ARG #undef bool #undef string #undef toggle /* * This callback should return 0 to have CmdArgs continue parsing * and return 1 to stop. */ typedef int (*CommandLineParsingErrorFunc) (void *, char *, char *); #ifdef CMD_TYPEDEF_STRUCT int cmd_parse_args (CMD_STRUCT_NAME *, int, char **, CommandLineParsingErrorFunc, void *); #else int cmd_parse_args (struct CMD_STRUCT_NAME *, int, char **, CommandLineParsingErrorFunc, void *); #endif #undef CMD_STRUCT_NAME #ifdef CMD_TYPEDEF_STRUCT #undef CMD_TYPEDEF_STRUCT #endif void cmd_show_usage (void); #endif /* __CMD__LINE__H */
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_STOPLOGGINGREQUEST_H #define QTAWS_STOPLOGGINGREQUEST_H #include "cloudtrailrequest.h" namespace QtAws { namespace CloudTrail { class StopLoggingRequestPrivate; class QTAWSCLOUDTRAIL_EXPORT StopLoggingRequest : public CloudTrailRequest { public: StopLoggingRequest(const StopLoggingRequest &other); StopLoggingRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(StopLoggingRequest) }; } // namespace CloudTrail } // namespace QtAws #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEWEBACLREQUEST_P_H #define QTAWS_DELETEWEBACLREQUEST_P_H #include "wafrequest_p.h" #include "deletewebaclrequest.h" namespace QtAws { namespace WAF { class DeleteWebACLRequest; class DeleteWebACLRequestPrivate : public WafRequestPrivate { public: DeleteWebACLRequestPrivate(const WafRequest::Action action, DeleteWebACLRequest * const q); DeleteWebACLRequestPrivate(const DeleteWebACLRequestPrivate &other, DeleteWebACLRequest * const q); private: Q_DECLARE_PUBLIC(DeleteWebACLRequest) }; } // namespace WAF } // namespace QtAws #endif
/************************************************************************************************** // file: Engine\a2de_games.h // A2DE // Copyright (c) 2013 Blisspoint Softworks and Casey Ugone. All rights reserved. // Contact cugone@gmail.com for questions or support. // summary: Global header for a2de Games classes. **************************************************************************************************/ #ifndef A2DE_GAMES_H #define A2DE_GAMES_H #include "a2de_vals.h" #include "Games/ADTGame.h" #endif
#include <stdio.h> #include <stdlib.h> #include "strings.h" typedef enum{ iniliteral = 0, iniboolean = 1, inistring = 2, inicomment = 3, inisection = 4, } ini_types; typedef enum{ comment = 3, section = 4, parsing = 5, newline = 6, } parser_status; typedef struct{ int start; int end; ini_types type; string* option; string* value; } ini_token; typedef struct{ int start; int end; int size; string* name; ini_token* contents; } ini_section; typedef struct{ ini_section* contents; int size; } ini_file; ini_section* addIniSection(ini_file* actual); ini_token* addIniToken(ini_section* actual); void parseIni(FILE* fichero, ini_file* ini); void writeToken(FILE* fichero, ini_token* token); void writeSection(FILE* fichero, ini_section* section); void writeIni(FILE* fichero, ini_file* ini);
/* * This file is part of CcOS. * * CcOS is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * CcOS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with CcOS. If not, see <http://www.gnu.org/licenses/>. **/ /** * @page CcTftp * @subpage CcTftpServerWorker * * @page CcTftpServerWorker * @copyright Andreas Dirmeier (C) 2017 * @author Andreas Dirmeier * @par Web: http://coolcow.de/projects/CcOS * @par Language: C++11 * @brief Class CcTftpServerWorker */ #ifndef H_CcTftpServerWorker_H_ #define H_CcTftpServerWorker_H_ #include "CcBase.h" #include "CcTftp.h" #include "CcUser.h" #include "Network/CcSocket.h" #include "ETftpServer.h" #include "CcByteArray.h" #include "CcStringList.h" #include "IWorker.h" #include "CcTftpServerConfig.h" /** * @brief Worker-Class for FTP. Each incomming Connection to Server * will create this Object. * It is getting automaticaly closed if connection is stopped or * interrupted. */ class CcTftpSHARED CcTftpServerWorker : public IWorker { public: /** * @brief Constructor * @param socket: Socket opend from Server to work with. * @param incomeServer: Pointer to Server to access for example UserList */ CcTftpServerWorker(CcByteArray* inData, CcSocket oSocket, CcTftpServerConfigHandle hServerConfig); /** * @brief Destructor */ virtual ~CcTftpServerWorker(); /** * @brief Main Loop for Worker, afert leaving this, the Worker is getting deleted */ void run(); private: // Methods /** * @brief Parse a Command received from Client * @param sRequest: String with containing command and parameter */ bool parseRequest(const CcString& sRequest); static uint16 getNewTransferId(); void runFileUpload(); void runFileDownload(); void sendError(ETftpServerErrors eErrorCode); bool sendNextWindow(); bool sendBlock(const CcByteArray& oData); private: // Types class CPrivate; private: // Member CPrivate* m_pPrivate = nullptr; CcSocket m_pSocket; //!< Socket received from Server CcByteArray *m_InData = nullptr; //!< Temporary Input Buffer for operating.. CcTftpServerConfigHandle m_hServerConfig; //!< Pointer to Server which was creating }; #endif // H_CcTftpServerWorker_H_
/* * vim:expandtab:shiftwidth=8:tabstop=8: */ /** * * \file fsal_unlink.c * \author $Author: leibovic $ * \date $Date: 2006/01/24 13:45:37 $ * \version $Revision: 1.9 $ * \brief object removing function. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fsal.h" #include "fsal_internal.h" #include "fsal_convert.h" #include "namespace.h" #include "fsal_common.h" /** * FSAL_unlink: * Remove a filesystem object . * * \param parentdir_handle (input): * Handle of the parent directory of the object to be deleted. * \param p_object_name (input): * Name of the object to be removed. * \param p_context (input): * Authentication context for the operation (user,...). * \param parentdir_attributes (optionnal input/output): * Post operation attributes of the parent directory. * As input, it defines the attributes that the caller * wants to retrieve (by positioning flags into this structure) * and the output is built considering this input * (it fills the structure according to the flags it contains). * May be NULL. * * \return Major error codes : * - ERR_FSAL_NO_ERROR (no error) * - ERR_FSAL_STALE (parentdir_handle does not address an existing object) * - ERR_FSAL_NOTDIR (parentdir_handle does not address a directory) * - ERR_FSAL_NOENT (the object designated by p_object_name does not exist) * - ERR_FSAL_NOTEMPTY (tried to remove a non empty directory) * - ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument) * - Other error codes can be returned : * ERR_FSAL_ACCESS, ERR_FSAL_IO, ... */ fsal_status_t FUSEFSAL_unlink(fusefsal_handle_t * parentdir_handle, /* IN */ fsal_name_t * p_object_name, /* IN */ fusefsal_op_context_t * p_context, /* IN */ fsal_attrib_list_t * parentdir_attributes /* [IN/OUT ] */ ) { int rc; fsal_status_t st; fusefsal_handle_t obj_handle; char parent_path[FSAL_MAX_PATH_LEN]; char child_path[FSAL_MAX_PATH_LEN]; struct stat stbuff; /* sanity checks. * note : parentdir_attributes are optional. * parentdir_handle is mandatory, * because, we do not allow to delete FS root ! */ if(!parentdir_handle || !p_context || !p_object_name) Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_unlink); /* set current FS context */ fsal_set_thread_context(p_context); /* get parent directory path */ rc = NamespacePath(parentdir_handle->data.inode, parentdir_handle->data.device, parentdir_handle->data.validator, parent_path); if(rc) Return(ERR_FSAL_STALE, rc, INDEX_FSAL_unlink); /* We have to know what type of entry it is, * to switch between "unlink" and "rmdir". * * To do this, do a getattr. */ FSAL_internal_append_path(child_path, parent_path, p_object_name->name); TakeTokenFSCall(); rc = p_fs_ops->getattr(child_path, &stbuff); ReleaseTokenFSCall(); if(rc) Return(fuse2fsal_error(rc, FALSE), rc, INDEX_FSAL_unlink); /* check type */ if(posix2fsal_type(stbuff.st_mode) == FSAL_TYPE_DIR) { /* proceed rmdir call */ /* operation not provided by filesystem */ if(!p_fs_ops->rmdir) Return(ERR_FSAL_NOTSUPP, 0, INDEX_FSAL_unlink); TakeTokenFSCall(); rc = p_fs_ops->rmdir(child_path); ReleaseTokenFSCall(); } else { /* proceed unlink call */ /* operation not provided by filesystem */ if(!p_fs_ops->unlink) Return(ERR_FSAL_NOTSUPP, 0, INDEX_FSAL_unlink); TakeTokenFSCall(); rc = p_fs_ops->unlink(child_path); ReleaseTokenFSCall(); } if(rc == 0 || rc == -ENOENT) { /* remove the entry from namespace */ NamespaceRemove(parentdir_handle->data.inode, parentdir_handle->data.device, parentdir_handle->data.validator, p_object_name->name); } if(rc) Return(fuse2fsal_error(rc, FALSE), rc, INDEX_FSAL_unlink); if(parentdir_attributes) { st = FUSEFSAL_getattrs(parentdir_handle, p_context, parentdir_attributes); /* On error, we set a flag in the returned attributes */ if(FSAL_IS_ERROR(st)) { FSAL_CLEAR_MASK(parentdir_attributes->asked_attributes); FSAL_SET_MASK(parentdir_attributes->asked_attributes, FSAL_ATTR_RDATTR_ERR); } } /* OK */ Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_unlink); }
// Created file "Lib\src\ehstorguids\X64\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_Photo_CameraSerialNumber, 0x14b81da1, 0x0135, 0x4d31, 0x96, 0xd9, 0x6c, 0xbf, 0xc9, 0x67, 0x1a, 0x99);
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_INCREASEREPLICACOUNTRESPONSE_P_H #define QTAWS_INCREASEREPLICACOUNTRESPONSE_P_H #include "elasticacheresponse_p.h" namespace QtAws { namespace ElastiCache { class IncreaseReplicaCountResponse; class IncreaseReplicaCountResponsePrivate : public ElastiCacheResponsePrivate { public: explicit IncreaseReplicaCountResponsePrivate(IncreaseReplicaCountResponse * const q); void parseIncreaseReplicaCountResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(IncreaseReplicaCountResponse) Q_DISABLE_COPY(IncreaseReplicaCountResponsePrivate) }; } // namespace ElastiCache } // namespace QtAws #endif
#ifndef DOUGAL_USB_H #define DOUGAL_USB_H 1 #define USB_STATUS_DOWN 0 #define USB_STATUS_STARTING 1 #define USB_STATUS_ENUMERATING 2 #define USB_STATUS_ACTIVE 3 #define USB_STATUS_CHARGER 4 int usb_get_status(); void usb_init(); void usb_sys_tick_handler(); void usb_off(); #endif /* ifndef DOUGAL_USB_H */
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DESCRIBEFLEETLOCATIONUTILIZATIONREQUEST_H #define QTAWS_DESCRIBEFLEETLOCATIONUTILIZATIONREQUEST_H #include "gameliftrequest.h" namespace QtAws { namespace GameLift { class DescribeFleetLocationUtilizationRequestPrivate; class QTAWSGAMELIFT_EXPORT DescribeFleetLocationUtilizationRequest : public GameLiftRequest { public: DescribeFleetLocationUtilizationRequest(const DescribeFleetLocationUtilizationRequest &other); DescribeFleetLocationUtilizationRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DescribeFleetLocationUtilizationRequest) }; } // namespace GameLift } // namespace QtAws #endif
/* $Id: testminissdpd.c,v 1.14 2016/03/01 17:49:51 nanard Exp $ */ /* Project : miniupnp * website : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * Author : Thomas BERNARD * copyright (c) 2005-2016 Thomas Bernard * This software is subjet to the conditions detailed in the * provided LICENCE file. */ #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include "codelength.h" #include "printresponse.h" void printversion(const unsigned char * resp, int n) { int l; const unsigned char * p; p = resp; DECODELENGTH(l, p); if(resp + n < p + l) { printf("get version error\n"); } printf("MiniSSDPd version : %.*s\n", l, p); } #define SENDCOMMAND(command, size) write(s, command, size); \ printf("Command written type=%u\n", (unsigned char)command[0]); int connect_unix_socket(const char * sockpath) { int s; struct sockaddr_un addr; s = socket(AF_UNIX, SOCK_STREAM, 0); addr.sun_family = AF_UNIX; strncpy(addr.sun_path, sockpath, sizeof(addr.sun_path)); if(connect(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_un)) < 0) { fprintf(stderr, "connecting to %s : ", addr.sun_path); perror("connect"); exit(1); } printf("Connected to %s\n", addr.sun_path); return s; } /* test program for minissdpd */ int main(int argc, char * * argv) { const char command0[] = { 0x00, 0x00 }; char command1[] = "\x01\x00urn:schemas-upnp-org:device:InternetGatewayDevice"; char command2[] = "\x02\x00uuid:fc4ec57e-b051-11db-88f8-0060085db3f6::upnp:rootdevice"; const char command3[] = { 0x03, 0x00 }; /* old versions of minissdpd would reject a command with * a zero length string argument */ char command3compat[] = "\x03\x00ssdp:all"; char command4[] = "\x04\x00test:test:test"; const char bad_command[] = { 0xff, 0xff }; const char overflow[] = { 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; const char command5[] = { 0x05, 0x00 }; const char bad_command4[] = { 0x04, 0x01, 0x60, 0x8f, 0xff, 0xff, 0xff, 0x7f}; int s; int i; void * tmp; unsigned char * resp = NULL; size_t respsize = 0; unsigned char buf[4096]; ssize_t n; int total = 0; const char * sockpath = "/var/run/minissdpd.sock"; for(i=0; i<argc-1; i++) { if(0==strcmp(argv[i], "-s")) sockpath = argv[++i]; } command1[1] = sizeof(command1) - 3; command2[1] = sizeof(command2) - 3; command3compat[1] = sizeof(command3compat) - 3; command4[1] = sizeof(command4) - 3; s = connect_unix_socket(sockpath); n = SENDCOMMAND(command0, sizeof(command0)); n = read(s, buf, sizeof(buf)); printf("Response received %d bytes\n", (int)n); if(n > 0) { printversion(buf, n); } else { printf("Command 0 (get version) not supported\n"); close(s); s = connect_unix_socket(sockpath); } n = SENDCOMMAND(command1, sizeof(command1) - 1); n = read(s, buf, sizeof(buf)); printf("Response received %d bytes\n", (int)n); printresponse(buf, n); if(n == 0) { close(s); s = connect_unix_socket(sockpath); } n = SENDCOMMAND(command2, sizeof(command2) - 1); n = read(s, buf, sizeof(buf)); printf("Response received %d bytes\n", (int)n); printresponse(buf, n); if(n == 0) { close(s); s = connect_unix_socket(sockpath); } buf[0] = 0; /* Slight hack for printing num devices when 0 */ n = SENDCOMMAND(command3, sizeof(command3)); n = read(s, buf, sizeof(buf)); if(n == 0) { printf("command3 failed, testing compatible one\n"); close(s); s = connect_unix_socket(sockpath); n = SENDCOMMAND(command3compat, sizeof(command3compat) - 1); n = read(s, buf, sizeof(buf)); } printf("Response received %d bytes\n", (int)n); printf("Number of devices %d\n", (int)buf[0]); while(n > 0) { tmp = realloc(resp, respsize + n); if(tmp == NULL) { fprintf(stderr, "memory allocation error\n"); break; } resp = tmp; respsize += n; if (n > 0) { memcpy(resp + total, buf, n); total += n; } if (n < (ssize_t)sizeof(buf)) { break; } n = read(s, buf, sizeof(buf)); printf("response received %d bytes\n", (int)n); } if(resp != NULL) { printresponse(resp, total); free(resp); resp = NULL; } if(n == 0) { close(s); s = connect_unix_socket(sockpath); } n = SENDCOMMAND(command4, sizeof(command4)); /* no response for request type 4 */ n = SENDCOMMAND(bad_command, sizeof(bad_command)); n = read(s, buf, sizeof(buf)); printf("Response received %d bytes\n", (int)n); printresponse(buf, n); if(n == 0) { close(s); s = connect_unix_socket(sockpath); } n = SENDCOMMAND(overflow, sizeof(overflow)); n = read(s, buf, sizeof(buf)); printf("Response received %d bytes\n", (int)n); printresponse(buf, n); if(n == 0) { close(s); s = connect_unix_socket(sockpath); } n = SENDCOMMAND(command5, sizeof(command5)); n = read(s, buf, sizeof(buf)); printf("Response received %d bytes\n", (int)n); printresponse(buf, n); if(n == 0) { close(s); s = connect_unix_socket(sockpath); } n = SENDCOMMAND(bad_command4, sizeof(bad_command4)); n = read(s, buf, sizeof(buf)); printf("Response received %d bytes\n", (int)n); printresponse(buf, n); close(s); return 0; }
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Designer of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** As a special exception, The Qt Company gives you certain additional ** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists for the convenience // of Qt Designer. This header // file may change from version to version without notice, or even be removed. // // We mean it. // #ifndef SHEET_DELEGATE_H #define SHEET_DELEGATE_H #include "shared_global_p.h" #include <QtWidgets/QItemDelegate> #include <QtWidgets/QTreeView> QT_BEGIN_NAMESPACE class QTreeView; namespace qdesigner_internal { class QDESIGNER_SHARED_EXPORT SheetDelegate: public QItemDelegate { Q_OBJECT public: SheetDelegate(QTreeView *view, QWidget *parent); virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; virtual QSize sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &index) const; private: QTreeView *m_view; }; } // namespace qdesigner_internal QT_END_NAMESPACE #endif // SHEET_DELEGATE_H
// Created file "Lib\src\Uuid\X64\napenforcementclient_i" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_INapEnforcementClientConnection, 0xfb3a3505, 0xddb1, 0x468a, 0xb3, 0x07, 0xf3, 0x28, 0xa5, 0x74, 0x19, 0xd8);
// Created file "Lib\src\format\X64\format" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(MetaDataGenerateTCEAdapters, 0xdcc9de90, 0x4151, 0x11d3, 0x88, 0xd6, 0x00, 0x90, 0x27, 0x54, 0xc4, 0x3a);
/* LUFA Library Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. */ /** \file * * Header file for Descriptors.c. */ #ifndef _DESCRIPTORS_H_ #define _DESCRIPTORS_H_ /* Includes: */ #include <avr/pgmspace.h> #include <LUFA/Drivers/USB/USB.h> /* Macros: */ /** Endpoint number of the Mass Storage device-to-host data IN * endpoint. */ #define MASS_STORAGE_IN_EPNUM 3 /** Endpoint number of the Mass Storage host-to-device data OUT * endpoint. */ #define MASS_STORAGE_OUT_EPNUM 4 /** Size in bytes of the Mass Storage data endpoints. */ #define MASS_STORAGE_IO_EPSIZE 64 /* Type Defines: */ /** Type define for the device configuration descriptor structure. This * must be defined in the application code, as the configuration * descriptor contains several sub-descriptors which vary between * devices, and which describe the device's usage to the host. */ typedef struct { USB_Descriptor_Configuration_Header_t Config; USB_Descriptor_Interface_t MS_Interface; USB_Descriptor_Endpoint_t MS_DataInEndpoint; USB_Descriptor_Endpoint_t MS_DataOutEndpoint; } USB_Descriptor_Configuration_t; /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, const void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); #endif
// Created file "Lib\src\dxguid\dxguid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4);
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DEREGISTERMANAGEDINSTANCEREQUEST_P_H #define QTAWS_DEREGISTERMANAGEDINSTANCEREQUEST_P_H #include "ssmrequest_p.h" #include "deregistermanagedinstancerequest.h" namespace QtAws { namespace SSM { class DeregisterManagedInstanceRequest; class DeregisterManagedInstanceRequestPrivate : public SsmRequestPrivate { public: DeregisterManagedInstanceRequestPrivate(const SsmRequest::Action action, DeregisterManagedInstanceRequest * const q); DeregisterManagedInstanceRequestPrivate(const DeregisterManagedInstanceRequestPrivate &other, DeregisterManagedInstanceRequest * const q); private: Q_DECLARE_PUBLIC(DeregisterManagedInstanceRequest) }; } // namespace SSM } // namespace QtAws #endif
/* ----------------------------------------------------------------------------- This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) For the latest info, see http://www.ostis.net Copyright (c) 2010 OSTIS OSTIS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OSTIS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with OSTIS. If not, see <http://www.gnu.org/licenses/>. ----------------------------------------------------------------------------- */ /** * @file act_on_gen.h * @author Alexey Rukin * @brief Описание активностИ, которая выполняется при наличии активных запросов на генерации по образцу. */ #ifndef __ACTIVITY_ON_GENERATE_H__ #define __ACTIVITY_ON_GENERATE_H__ #ifdef _MSC_VER #pragma warning(disable:4786) #endif #include <libsc/std_constraints.h> #ifndef NSM_DONT_USE_SCHEDULER # include <libpm/pm_sched.h> #endif //NSM_DONT_USE_SCHEDULER #include <libsc/pm_keynodes.h> #include <list> #include <map> #include "nsm_keynodes.h" #include "act_on_confirm_p.h" /** * проверяем список активных целей (ищем начало и конец дуги) и помещаем * в соответствующую очередь. **/ struct Sact_on_gen_ : public sc_activity { typedef std::list<SIsomQuery> ListIsomQuery; typedef std::map<sc_addr, ListIsomQuery> addr2query_map; addr2query_map deny_queries; typedef std::list<Sact_goals_msg> goal_list; goal_list active_goals; /// List of arcs from NSM_GENERATE_ sc_retval init(sc_addr _this) {return RV_OK;}; void done() {delete this;}; sc_retval activate(sc_session *,sc_addr _this,sc_addr param1,sc_addr,sc_addr); /** * @brief Generate construction for pattern at the end of @p arc_goal. * @note Use pattern segment for generating. * @param arc_goal arc with pattern query * @param params parameters mapping from pattern element to parameter * @param[out] return_list if present then contains gened elements */ void do_confirm_(sc_addr arc_goal, const addr2addr_map &params, addr_list *return_list=0); bool do_deny_(sc_addr query, LISTSC_ADDR *ret_lst = 0); //! For @p t returns corresponding type for generating. inline sc_type get_corresponding_type(sc_type t) { sc_type res = t & (SC_SYNTACTIC_MASK|SC_FUZZYNESS_MASK); //arc, node, undef, pos, neg, fuz if (t & SC_VAR) res |= SC_CONST; else if (t & SC_METAVAR) res |= SC_VAR; return res; } }; extern Sact_on_gen_ *act_on_gen_; #endif // __ACTIVITY_ON_GENERATE_H__
/***************************************************************************** Copyright (c) 2010, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************** * Contents: Native middle-level C interface to LAPACK function dptcon * Author: Intel Corporation * Generated October, 2010 *****************************************************************************/ #include "lapacke.h" lapack_int LAPACKE_dptcon_work( lapack_int n, const double* d, const double* e, double anorm, double* rcond, double* work ) { lapack_int info = 0; /* Call LAPACK function and adjust info */ LAPACK_dptcon( &n, d, e, &anorm, rcond, work, &info ); return info; }
/*! Copyright (C) 2014, 申瑞珉 (Ruimin Shen) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <OTL/Optimizer/SMS-EMOA/Triple/SMS-EMOA.h> #include "../MakeMonteCarloHypervolume.h" namespace pyotl { namespace optimizer { namespace sms_emoa { namespace triple { template <typename _TReal, typename _TDecision, typename _TRandom> class MonteCarloHV_SMS_EMOA : public otl::optimizer::sms_emoa::triple::SMS_EMOA<_TReal, _TDecision, _TRandom, MakeMonteCarloHypervolume<_TReal, _TRandom> > { public: typedef _TReal TReal; typedef _TDecision TDecision; typedef _TRandom TRandom; typedef MakeMonteCarloHypervolume<TReal, TRandom> TMakeHypervolume; typedef otl::optimizer::sms_emoa::triple::SMS_EMOA<TReal, TDecision, TRandom, TMakeHypervolume> TSuper; typedef typename TSuper::TIndividual TIndividual; typedef typename TSuper::TSolutionSet TSolutionSet; typedef typename TSuper::TProblem TProblem; typedef typename TSuper::TCrossover TCrossover; typedef typename TSuper::TMutation TMutation; MonteCarloHV_SMS_EMOA(TRandom random, TProblem &problem, const std::vector<TDecision> &initial, TCrossover &crossover, TMutation &mutation, const size_t sample); ~MonteCarloHV_SMS_EMOA(void); }; template <typename _TReal, typename _TDecision, typename _TRandom> MonteCarloHV_SMS_EMOA<_TReal, _TDecision, _TRandom>::MonteCarloHV_SMS_EMOA(TRandom random, TProblem &problem, const std::vector<TDecision> &initial, TCrossover &crossover, TMutation &mutation, const size_t sample) : TSuper(random, problem, initial, crossover, mutation, TMakeHypervolume(random, sample)) { } template <typename _TReal, typename _TDecision, typename _TRandom> MonteCarloHV_SMS_EMOA<_TReal, _TDecision, _TRandom>::~MonteCarloHV_SMS_EMOA(void) { } } } } }
// Created file "Lib\src\Uuid\shguids2" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(CLSID_DsPropertyPages, 0x0d45d530, 0x764b, 0x11d0, 0xa1, 0xca, 0x00, 0xaa, 0x00, 0xc1, 0x6e, 0x65);
#pragma once #define LIBSC_USE_BATTERY_METER 1 #define LIBSC_USE_BUTTON 2 #define LIBSC_USE_BUZZER 1 #define LIBSC_USE_ENCODER 2 #define LIBSC_USE_JOYSTICK 1 #define LIBSC_USE_LCD 1 #define LIBSC_USE_LED 4 #define LIBSC_USE_MOTOR 2 //#define LIBSC_USE_LINEAR_CCD 2 #define LIBSC_USE_OV7725 1 #define LIBSC_USE_SERVO 1 #define LIBSC_USE_UART 2 #define LIBSC_USE_MPU6050 1 #define LIBSC_USE_QMC5883 1 #define LIBSC_USE_PASSIVE_BUZZER 1 #define LIBSC_PASSSIVE_BUZZER0_PIT_CHANNEL 1 #define LIBSC_BUZZER0 libbase::k60::Pin::Name::kPta8 #define LIBSC_MPU6050_SCL libbase::k60::Pin::Name::kPtb0 #define LIBSC_MPU6050_SDA libbase::k60::Pin::Name::kPtb1 #define LIBSC_QMC5883_SCL libbase::k60::Pin::Name::kPtc10 #define LIBSC_QMC5883_SDA libbase::k60::Pin::Name::kPtc11 #define LIBSC_BATTERY_METER libbase::k60::Adc::Name::kAdc3Ad6A #define LIBSC_BUTTON0 libbase::k60::Pin::Name::kPte7 #define LIBSC_BUTTON1 libbase::k60::Pin::Name::kPtc12 #define LIBSC_BUZZER0 libbase::k60::Pin::Name::kPta8 //#define LIBSC_BUZZER_ACIVE_LEVEL 0 #define LIBSC_ENCODER0_QDA libbase::k60::Pin::Name::kPta10 #define LIBSC_ENCODER0_QDB libbase::k60::Pin::Name::kPta11 #define LIBSC_ENCODER1_QDA libbase::k60::Pin::Name::kPta12 #define LIBSC_ENCODER1_QDB libbase::k60::Pin::Name::kPta13 #define LIBSC_JOYSTICK0_UP libbase::k60::Pin::Name::kPtc8 #define LIBSC_JOYSTICK0_DOWN libbase::k60::Pin::Name::kPtc4 #define LIBSC_JOYSTICK0_LEFT libbase::k60::Pin::Name::kPtc5 #define LIBSC_JOYSTICK0_RIGHT libbase::k60::Pin::Name::kPtc6 #define LIBSC_JOYSTICK0_SELECT libbase::k60::Pin::Name::kPtc7 #define LIBSC_ST7735R_RST libbase::k60::Pin::Name::kPte3 #define LIBSC_ST7735R_DC libbase::k60::Pin::Name::kPte0 #define LIBSC_ST7735R_CS libbase::k60::Pin::Name::kPte4 #define LIBSC_ST7735R_SDAT libbase::k60::Pin::Name::kPte1 #define LIBSC_ST7735R_SCLK libbase::k60::Pin::Name::kPte2 #define LIBSC_LED0 libbase::k60::Pin::Name::kPte12 #define LIBSC_LED1 libbase::k60::Pin::Name::kPte11 #define LIBSC_LED2 libbase::k60::Pin::Name::kPte10 #define LIBSC_LED3 libbase::k60::Pin::Name::kPte9 #define LIBSC_MOTOR0_PWM libbase::k60::Pin::Name::kPtd0 #define LIBSC_MOTOR0_DIR libbase::k60::Pin::Name::kPtd1 #define LIBSC_MOTOR1_PWM libbase::k60::Pin::Name::kPtd2 #define LIBSC_MOTOR1_DIR libbase::k60::Pin::Name::kPtd3 //#define LIBSC_MOTOR0_PWMA libbase::k60::Pin::Name::kPtd0 //#define LIBSC_MOTOR0_PWMB libbase::k60::Pin::Name::kPtd1 //#define LIBSC_MOTOR0_DEADTIME 1000 // //#define LIBSC_MOTOR1_PWMA libbase::k60::Pin::Name::kPtd2 //#define LIBSC_MOTOR1_PWMB libbase::k60::Pin::Name::kPtd3 //#define LIBSC_MOTOR1_DEADTIME 1000 //#define LIBSC_ALTERNATE_MOTOR_CW_PWM 1 // #define LIBSC_LINEAR_CCD0_SI libbase::k60::Pin::Name::kPtb7 // #define LIBSC_LINEAR_CCD0_CLK libbase::k60::Pin::Name::kPtb10 // #define LIBSC_LINEAR_CCD0_AD libbase::k60::Pin::Name::kPtb4 // #define LIBSC_LINEAR_CCD1_SI libbase::k60::Pin::Name::kPta28 // #define LIBSC_LINEAR_CCD1_CLK libbase::k60::Pin::Name::kPtb2 // #define LIBSC_LINEAR_CCD1_AD libbase::k60::Pin::Name::kPtb3 #define LIBSC_OV77250_VSYNC libbase::k60::Pin::Name::kPtc2 #define LIBSC_OV77250_PCLK libbase::k60::Pin::Name::kPtb6 #define LIBSC_OV77250_DATA0 libbase::k60::Pin::Name::kPtb16 #define LIBSC_OV77250_SDA libbase::k60::Pin::Name::kPtc1 #define LIBSC_OV77250_SCL libbase::k60::Pin::Name::kPtc0 #define LIBSC_OV77250_DMA_CH 1 #define LIBSC_SERVO0 libbase::k60::Pin::Name::kPta7 #define LIBSC_UART0_TX libbase::k60::Pin::Name::kPte25 #define LIBSC_UART0_RX libbase::k60::Pin::Name::kPte24 #define LIBSC_UART1_TX libbase::k60::Pin::Name::kPtd6 #define LIBSC_UART1_RX libbase::k60::Pin::Name::kPtd7
#ifndef DEVICECARDDAV_H #define DEVICECARDDAV_H #include <QUrl> #include <QTimer> #include "Device.h" #include "DavPropertyTree.h" #include "ContactBook.h" class DeviceCardDav: public Device { Q_OBJECT using Super = Device; public: DeviceCardDav(); /** Returns the display name that should be used for this device. */ virtual QString displayName() const override; /** Starts the device. The device can start its background threads here, and report its Online state only after this call. */ virtual void start() override; /** Stops the device. The device should stop its threads here asynchronously. */ virtual void stop() override; /** Returns true if the device is currently online. */ virtual bool isOnline() const override; /** Returns all the contact books currently available in the device. */ virtual const std::vector<ContactBookPtr> contactBooks() override { std::vector<ContactBookPtr> res; for (const auto & cb: m_ContactBooks) { res.push_back(cb); } return res; } protected: /** Contact specialization for DAV contact books. */ class DavContact: public Contact { protected: QString m_Etag; QUrl m_Url; public: const QString & etag() const { return m_Etag; } void setEtag(const QString & a_Etag) { m_Etag = a_Etag; } const QUrl & url() const { return m_Url; } void setUrl(const QUrl & a_Url) { m_Url = a_Url; } }; using DavContactPtr = std::shared_ptr<DavContact>; /** ContactBook specialization for DAV contact books. Remembers the addressbook's base URL. */ class DavContactBook: public ContactBook { using Super = ContactBook; public: QUrl m_BaseUrl; explicit DavContactBook(const QUrl a_BaseUrl, const QString & a_DisplayName): Super(a_DisplayName), m_BaseUrl(a_BaseUrl) { } // ContactBook overrides: virtual ContactPtr createNewContact() override; /** Returns the contact represented by the specified URL, or nullptr if no such contact. */ DavContactPtr contactFromUrl(const QUrl & a_Url); }; using DavContactBookPtr = std::shared_ptr<DavContactBook>; /** The server's base URL. */ QUrl m_ServerUrl; /** The user name to use when connecting to the server. */ QString m_UserName; /** The password to use when connecting to the server. */ QString m_Password; /** The contact books on the server. */ std::vector<DavContactBookPtr> m_ContactBooks; /** The device name, as displayed to the user. */ QString m_DisplayName; /** User-visible status of the device. Empty means OK, non-empty means error. Appended to DisplayName. */ QString m_Status; /** Indicates the online state of this device, based on periodic pings to the addressbook API of the server. */ bool m_IsOnline; /** The current user principal URL. */ QUrl m_PrincipalUrl; /** The home URL of the address books for this user. */ QUrl m_AddressbookHomeUrl; /** The timer used for checking the online status of this device periodically. Triggers the periodicCheck() slot. */ QTimer m_PeriodicCheck; /** The WebDAV protocol parser and storage for the WebDAV properties. Is nullptr while this object is not loaded. */ std::unique_ptr<DavPropertyTree> m_DavPropertyTree; /** Loads the Device-specific data from the configuration. a_Config is a config returned by save() in a previous app run, through which a Device descendant is expected to persist its logical state - connection settings, login etc. */ virtual bool load(const QJsonObject & a_Config) override; /** Saves the Device-specific config data, so that the Device can be re-created next time the app is started. The descendants are expected to save their logical state - connection settings, login etc. */ virtual QJsonObject save() const override; /** Handles the response for addressbook support detection. */ void respDetectAddressBookSupport(const QNetworkReply & a_Reply); /** Handles the response for current user principal request. */ void respCurrentUserPrincipal(const QNetworkReply & a_Reply); /** Handles the response for addressbook root query. */ void respAddressbookRoot(const QNetworkReply & a_Reply); /** Handles the response for addressbook list query. */ void respListAddressbooks(const QNetworkReply & a_Reply); /** Handles the response for addressbook Etag report. */ void respCheckAddressbookEtags(const QNetworkReply & a_Reply); /** Handles the response for addressbook data report. */ void respAddressData(const QNetworkReply & a_Reply); /** Returns the display name for the specified addressbook. If the server doesn't provide an addressbook displayname, it is synthesized from the URL. */ QString displayNameForAdressbook(const QUrl & a_AddressbookUrl); /** Marks the device as online. */ void setOnline(); /** Marks the device as offline. TODO: Triggers the online-state-change signals. */ void setOffline(); /** Loads the server-side changes for the specified ContactBook (async). */ void loadContactBook(DavContactBook * a_ContactBook); /** Returns the ContactBook that is represented by the specified URL. Returns nullptr if URL not found. */ DavContactBookPtr contactBookFromUrl(const QUrl & a_Url); /** Parses the VCard data received from the server into the specified contact. */ void parseServerDataToContact(const QString & a_ServerData, DavContactPtr a_Contact); protected slots: /** Triggered when a network request to the CardDAV server finishes. */ void replyFinished( const QNetworkReply * a_Reply, const QByteArray * a_ResponseBody, QVariant a_UserData ); /** Emitted when the DAV response parser runs into an error while processing a response. */ void davResponseError(const QString & a_Error); /** Pings the addressbook API of the server to update the m_IsOnline member. Also initiates the refresh of ContactBooks available on the server. */ void periodicCheck(); }; #endif // DEVICECARDDAV_H
// // AppDelegate.h // 07-position和aechorPoint // // Created by yhp on 16/5/15. // Copyright © 2016年 YouHuaPei. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
#include "alfe/main.h" #ifndef INCLUDED_CIRCULAR_BUFFER_H #define INCLUDED_CIRCULAR_BUFFER_H template<class T> class CircularBuffer { public: CircularBuffer() : _buffer(0), _readPosition(0), _writePosition(0), _mask(1), _count(0), _size(0) { } ~CircularBuffer() { if (_buffer != 0) delete[] _buffer; } void write(const T& t) { add(1); _buffer[writeOffset(0)] = t; added(1); } const T& read(int n = 0) const { return _buffer[readOffset(n)]; } int readBoundary() const { return _size - _readPosition; } int writeBoundary() const { return _size - _writePosition; } T* readPointer() const { return _buffer + _readPosition; } T* writePointer() const { return _buffer + _writePosition; } T* lowPointer() const { return _buffer; } void copyIn(T* source, int first, int n) { int start = writeOffset(first); int n1 = min(n, _size - start); memcpy(_buffer + start, source, n1*sizeof(T)); memcpy(_buffer, source + n1, (n - n1)*sizeof(T)); } void copyOut(T* destination, int first, int n) { int start = readOffset(first); int n1 = min(n, _size - start); memcpy(destination, _buffer + start, n1*sizeof(T)); memcpy(destination + n1, _buffer, (n - n1)*sizeof(T)); } int count() const { return _count; } void add(int n) { // Make sure we have enough space for an additional n items int newN = n + _count; if (_size < newN) { // Double the size of the buffer until it's big enough. int newSize = _size; if (newSize == 0) newSize = 1; while (newSize < newN) newSize <<= 1; // Since buffers never shrink, this doesn't need to be particularly // fast. Just copy all the data to the start of the new buffer. T* newBuffer = new T[newSize]; if (_buffer != 0) { copyOut(newBuffer, 0, _count); delete[] _buffer; } _writePosition = _count; _readPosition = 0; _size = newSize; _buffer = newBuffer; _mask = _size - 1; } } void added(int n) { _count += n; _writePosition = writeOffset(n); } void remove(int n) { _count -= n; _readPosition = readOffset(n); } private: int readOffset(int delta) const { return (delta + _readPosition)&_mask; } int writeOffset(int delta) const { return (delta + _writePosition)&_mask; } T* _buffer; int _readPosition; int _writePosition; int _mask; int _count; int _size; }; #endif // INCLUDED_CIRCULAR_BUFFER_H